diff options
Diffstat (limited to 'indra/llmessage/lldatapacker.cpp')
-rw-r--r-- | indra/llmessage/lldatapacker.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp index d36e639f45..74a6a871c0 100644 --- a/indra/llmessage/lldatapacker.cpp +++ b/indra/llmessage/lldatapacker.cpp @@ -1875,7 +1875,10 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v { fpos_t last_pos; fgetpos(mFP, &last_pos); - fgets(buffer, DP_BUFSIZE, mFP); + if (fgets(buffer, DP_BUFSIZE, mFP) == NULL) + { + buffer[0] = '\0'; + } sscanf(buffer, "%511s %511[^\n]", keyword, value); /* Flawfinder: ignore */ |