]> granicus.if.org Git - php/commitdiff
fix segfault
authorAntony Dovgal <tony2001@php.net>
Fri, 18 Jul 2008 07:39:53 +0000 (07:39 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 18 Jul 2008 07:39:53 +0000 (07:39 +0000)
ext/gd/gd.c

index 32a8ff4a9294c718233c22d74cc214594540efce..3484c79d95e1a2c0a39413c596d87d1a3c99fde8 100644 (file)
@@ -3041,7 +3041,7 @@ PHP_FUNCTION(imagecolorat)
                }
        } else {
                if (im->pixels && gdImageBoundsSafe(im, x, y)) {
-                       RETURN_LONG(im->pixels[x][y]);
+                       RETURN_LONG(im->pixels[y][x]);
                } else {
                        php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%ld,%ld is out of bounds", x, y);
                        RETURN_FALSE;