AGI: Change set.simple string copy code
This commit is contained in:
parent
f5a83adc01
commit
c26d3fd62f
1 changed files with 3 additions and 2 deletions
|
@ -909,8 +909,9 @@ void cmdSetSimple(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
|
|||
// Try to get description for automatic saves
|
||||
textPtr = state->strings[stringNr];
|
||||
|
||||
memset(state->automaticSaveDescription, 0, sizeof(state->automaticSaveDescription));
|
||||
strncpy(state->automaticSaveDescription, textPtr, sizeof(state->automaticSaveDescription) - 1);
|
||||
strncpy(state->automaticSaveDescription, textPtr, sizeof(state->automaticSaveDescription));
|
||||
state->automaticSaveDescription[sizeof(state->automaticSaveDescription) - 1] = 0;
|
||||
|
||||
if (state->automaticSaveDescription[0]) {
|
||||
// We got it and it's set, so enable automatic saving
|
||||
state->automaticSave = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue