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 e41b7f24f82dfb88e22f49bf04b354a3726f4683..404ceb028b4bc5af3794b045959b08cffc4542e2 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))