shada: Make sure that NIL and EXT values can also be parsed back

Note: currently they are both *dumped*, but parsing them produces an error. This
is inappropriate: variables should either be skipped with error message when
dumping or should be read back properly.

It also appears that I did not have test for “has wrong variable value type”
error, so nothing got removed from errors_spec.
This commit is contained in:
ZyX
2016-02-06 21:03:33 +03:00
parent 0aa3e7b7ce
commit d4106f6df3
2 changed files with 11 additions and 8 deletions

View File

@@ -3883,12 +3883,6 @@ shada_read_next_item_hist_no_conv:
initial_fpos);
goto shada_read_next_item_error;
}
if (unpacked.data.via.array.ptr[1].type == MSGPACK_OBJECT_NIL
|| unpacked.data.via.array.ptr[1].type == MSGPACK_OBJECT_EXT) {
emsgu(_(READERR("variable", "has wrong variable value type")),
initial_fpos);
goto shada_read_next_item_error;
}
entry->data.global_var.name =
xmemdupz(unpacked.data.via.array.ptr[0].via.bin.ptr,
unpacked.data.via.array.ptr[0].via.bin.size);