From 2db27aebe7dc89772aaa8df53361eef801f60063 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 22 Jul 2019 16:22:23 +0100 Subject: [PATCH] prevent type inference on quoted strings, closes #50 --- src/JsonNbtParser.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/JsonNbtParser.php b/src/JsonNbtParser.php index e44b808..9369692 100644 --- a/src/JsonNbtParser.php +++ b/src/JsonNbtParser.php @@ -179,6 +179,7 @@ private static function readValue(BinaryStream $stream, string $name = "") : Nam if($inQuotes){ //anything is allowed inside quotes, except unescaped quotes if($c === '"'){ $inQuotes = false; + $retval = new StringTag($name, $value); $foundEnd = true; }elseif($c === "\\"){ $value .= $stream->get(1);