clover: Fix typo in validate_object()
authorTom Stellard <thomas.stellard@amd.com>
Fri, 21 Mar 2014 18:08:26 +0000 (11:08 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 21 Mar 2014 18:12:12 +0000 (19:12 +0100)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/api/transfer.cpp

index e41b7f2..404ceb0 100644 (file)
@@ -86,7 +86,7 @@ namespace {
          throw error(CL_INVALID_VALUE);
 
       // ...and within the specified object.
-      if (dot(pitch, origin) + size(pitch, origin) > mem.size())
+      if (dot(pitch, origin) + size(pitch, region) > mem.size())
          throw error(CL_INVALID_VALUE);
 
       if (any_of(is_zero(), region))