]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qobject/json-parser.c
migration/savevm: load_header before load_setup
[mirror_qemu.git] / qobject / json-parser.c
index 7a7ae9e8d1a860439c83c079c29a7ca94599d4a5..d8eb210c0c7e784d67ec695a483a080b71f3c203 100644 (file)
@@ -208,11 +208,13 @@ static QString *parse_string(JSONParserContext *ctxt, JSONToken *token)
             }
             break;
         case '%':
-            if (ctxt->ap && ptr[1] != '%') {
-                parse_error(ctxt, token, "can't interpolate into string");
-                goto out;
+            if (ctxt->ap) {
+                if (ptr[1] != '%') {
+                    parse_error(ctxt, token, "can't interpolate into string");
+                    goto out;
+                }
+                ptr++;
             }
-            ptr++;
             /* fall through */
         default:
             cp = mod_utf8_codepoint(ptr, 6, &end);