Commit Diff


commit - bed3b737c63e6bb956e3bbb7930f7fbbff59a708
commit + 915c5d1e95226e646bb8cb3bb6fbbf9b15233c4e
blob - 9ceb350c1b120477b7056fc795ffefc85b8a0029
blob + 49c885d4856f4b14a58214b6858486989cac488a
--- third_party/lua-yaml/lyaml.cc
+++ third_party/lua-yaml/lyaml.cc
@@ -377,7 +377,7 @@ static int load_node(struct lua_yaml_loader *loader) {
          handle_anchor(loader);
 
          is_map++;
-         map_idx = 1;
+         map_idx = 0;
          /*
          while (1) {
             int r;
@@ -434,12 +434,13 @@ static int load_node(struct lua_yaml_loader *loader) {
             lua_rawseti(loader->L, -2, seq_idx++);
             continue;
          }
-         printf("YAML_SCALAR_EVENT\n");
          if (is_map > 0) {
             map_idx++;
-            printf("map_idx %d\n", map_idx);
-            if (map_idx % 2 == 0)
+            //printf("map_idx %d\n", map_idx);
+            if (map_idx % 2 == 0) {
                lua_rawset(loader->L, -3);
+            }
+            continue;
          }
          return 1;