mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-30 15:13:57 +00:00
Updated size check
This commit is contained in:
@@ -845,7 +845,7 @@ int ILibSimpleDataStore_PutCompressed(ILibSimpleDataStore dataStore, char* key,
|
||||
__EXPORT_TYPE int ILibSimpleDataStore_GetInt(ILibSimpleDataStore dataStore, char* key, int defaultValue)
|
||||
{
|
||||
int bufLen = ILibSimpleDataStore_Get(dataStore, key, ILibScratchPad, sizeof(ILibScratchPad));
|
||||
if (bufLen == 0 || bufLen > sizeof(ILibScratchPad)) { return(defaultValue); }
|
||||
if (bufLen == 0 || bufLen >= sizeof(ILibScratchPad)) { return(defaultValue); }
|
||||
return(atoi(ILibScratchPad));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user