diff options
Diffstat (limited to 'storage/connect/json.cpp')
-rw-r--r-- | storage/connect/json.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp index da94d4e227c..b86d2da21b7 100644 --- a/storage/connect/json.cpp +++ b/storage/connect/json.cpp @@ -1403,10 +1403,20 @@ double JVALUE::GetFloat(void) /***********************************************************************/ /* Return the Value's String value. */ /***********************************************************************/ -PSZ JVALUE::GetString(void) +PSZ JVALUE::GetString(PGLOBAL g) { - char buf[32]; - return (Value) ? Value->GetCharString(buf) : NULL; + char *p; + + if (Value) { + char buf[32]; + + if ((p = Value->GetCharString(buf)) == buf) + p = PlugDup(g, buf); + + } else + p = NULL; + + return p; } // end of GetString /***********************************************************************/ |