Skip to content

Commit

Permalink
replace VLA with alloca for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
tkelman committed Nov 21, 2014
1 parent ca7f6d1 commit 8bc9339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/disasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int OpInfoLookup(void *DisInfo, uint64_t PC,
if (TagType != 1)
return 0; // Unknown data format
LLVMOpInfo1 *info = (LLVMOpInfo1*)TagBuf;
uint8_t bytes[Size];
uint8_t *bytes = (uint8_t*) alloca(Size*sizeof(uint8_t));
for (uint64_t i=0; i<Size; ++i)
SymTab->getMemoryObject().readByte(PC+Offset+i, &bytes[i]);
size_t pointer;
Expand Down

0 comments on commit 8bc9339

Please sign in to comment.