1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-30 15:13:57 +00:00

Updated size check

This commit is contained in:
Bryan Roe
2020-09-23 14:01:22 -07:00
parent 010f77b5d8
commit 812fbae6e5

View File

@@ -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));
}