Skip to content

Commit

Permalink
Fix switch fallthrough on memory writes
Browse files Browse the repository at this point in the history
  • Loading branch information
nosoop committed Aug 1, 2024
1 parent 20f5e87 commit f01170c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions types/memblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,13 @@ cell_t sm_MemoryBlockStoreCellToOffset(IPluginContext *pContext, const cell_t *p
switch(params[3]) {
case NumberType_Int8:
*reinterpret_cast<int8_t*>(addr) = value;
break;
case NumberType_Int16:
*reinterpret_cast<int16_t*>(addr) = value;
break;
case NumberType_Int32:
*reinterpret_cast<int32_t*>(addr) = value;
break;
}
return 0;
}
Expand Down

0 comments on commit f01170c

Please sign in to comment.