1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-02-09 21:20:04 +00:00

Converted atoi to safer alternative

This commit is contained in:
Bryan Roe
2020-09-24 15:50:27 -07:00
parent 600758ff8d
commit 73b1d5e77c
9 changed files with 105 additions and 40 deletions

View File

@@ -846,7 +846,7 @@ __EXPORT_TYPE int ILibSimpleDataStore_GetInt(ILibSimpleDataStore dataStore, char
{
int bufLen = ILibSimpleDataStore_Get(dataStore, key, ILibScratchPad, sizeof(ILibScratchPad));
if (bufLen == 0 || bufLen >= sizeof(ILibScratchPad)) { return(defaultValue); }
return(atoi(ILibScratchPad));
return(ILib_atoi2_int32(ILibScratchPad, sizeof(ILibScratchPad)));
}
// Get a value from the data store given a key