Fix: Saving SDT_INTLIST handle unsigned values properly

This commit is contained in:
Johannes E. Krause 2019-03-22 03:18:58 +01:00 committed by Charles Pigott
parent 3089c625e4
commit 76eab18f02

View File

@ -276,7 +276,7 @@ static void MakeIntList(char *buf, const char *last, const void *array, int nele
case SLE_VAR_U32: v = *(const uint32 *)p; p += 4; break;
default: NOT_REACHED();
}
buf += seprintf(buf, last, (i == 0) ? "%d" : ",%d", v);
buf += seprintf(buf, last, IsSignedVarMemType(type) ? ((i == 0) ? "%d" : ",%d") : ((i == 0) ? "%u" : ",%u"), v);
}
}