ext/psd_native/mask.c in psd_native-1.1.1 vs ext/psd_native/mask.c in psd_native-1.1.2
- old
+ new
@@ -29,11 +29,11 @@
doc_x = mask_left + x;
doc_y = mask_top + y;
layer_x = doc_x - layer_left;
layer_y = doc_y - layer_top;
- if (layer_x < 0 || layer_x > layer_width || layer_y < 0 || layer_y > layer_height) continue;
-
+ if (layer_x < 0 || layer_x >= layer_width || layer_y < 0 || layer_y >= layer_height) continue;
+
color = FIX2UINT(rb_funcall(canvas, rb_intern("[]"), 2, INT2FIX(layer_x), INT2FIX(layer_y)));
if (doc_x < 0 || doc_x >= doc_width || doc_y < 0 || doc_y > doc_height) {
alpha = 0;
} else {
\ No newline at end of file