summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsdserialize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llsdserialize.cpp')
-rw-r--r--indra/llcommon/llsdserialize.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 9f4ce64d2c..7a66d70d3f 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -1502,7 +1502,7 @@ void LLSDBinaryFormatter::formatString(
*/
int deserialize_string(std::istream& istr, std::string& value, S32 max_bytes)
{
- char c = istr.get();
+ int c = istr.get();
if(istr.fail())
{
// No data in stream, bail out but mention the character we
@@ -1544,7 +1544,7 @@ int deserialize_string_delim(
while (true)
{
- char next_char = istr.get();
+ int next_byte = istr.get();
++count;
if(istr.fail())
@@ -1553,6 +1553,8 @@ int deserialize_string_delim(
value = write_buffer.str();
return LLSDParser::PARSE_FAILURE;
}
+
+ char next_char = (char)next_byte; // Now that we know it's not EOF
if(found_escape)
{
@@ -1641,7 +1643,7 @@ int deserialize_string_raw(
char buf[BUF_LEN]; /* Flawfinder: ignore */
istr.get(buf, BUF_LEN - 1, ')');
count += istr.gcount();
- char c = istr.get();
+ int c = istr.get();
c = istr.get();
count += 2;
if(((c == '"') || (c == '\'')) && (buf[0] == '('))