Only calculate length on ser of names

main
Cameron Murphy Reikes 2 years ago
parent b942e0afd9
commit 515385a477

@ -681,8 +681,12 @@ const static SerMaybeFailure ser_ok = { 0 };
SerMaybeFailure ser_data(SerState* ser, char* data, size_t data_len, const char* name, const char* file, int line)
{
char var_name[512] = { 0 };
size_t var_name_len = 0;
if(ser->write_varnames)
{
snprintf(var_name, 512, "%d%s", line, name); // can't have separator before the name, when comparing names skips past the digit
size_t var_name_len = strlen(var_name);
var_name_len = strlen(var_name);
}
if (ser->serializing)
{
if (ser->write_varnames)

Loading…
Cancel
Save