[Lldb-commits] [lldb] r250891 - [RenderScript] Fix out of bounds warning.

Ewan Crawford via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 21 03:27:10 PDT 2015


Author: ewancrawford
Date: Wed Oct 21 05:27:10 2015
New Revision: 250891

URL: http://llvm.org/viewvc/llvm-project?rev=250891&view=rev
Log:
[RenderScript] Fix out of bounds warning.


Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp

Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=250891&r1=250890&r2=250891&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Wed Oct 21 05:27:10 2015
@@ -1624,9 +1624,9 @@ RenderScriptRuntime::SaveAllocation(Stre
     head.hdr_size = static_cast<uint16_t>(sizeof(AllocationDetails::FileHeader));
     head.type = static_cast<uint16_t>(*alloc->type.get());
     head.kind = static_cast<uint32_t>(*alloc->type_kind.get());
-    head.dims[1] = static_cast<uint32_t>(alloc->dimension.get()->dim_1);
-    head.dims[2] = static_cast<uint32_t>(alloc->dimension.get()->dim_2);
-    head.dims[3] = static_cast<uint32_t>(alloc->dimension.get()->dim_3);
+    head.dims[0] = static_cast<uint32_t>(alloc->dimension.get()->dim_1);
+    head.dims[1] = static_cast<uint32_t>(alloc->dimension.get()->dim_2);
+    head.dims[2] = static_cast<uint32_t>(alloc->dimension.get()->dim_3);
     head.element_size = static_cast<uint32_t>(GetElementSize(alloc));
 
     // Write the file header




More information about the lldb-commits mailing list