[vulkan] Use correct type for parsing int32

Using size_t doesn't work too well for -1.
This commit is contained in:
Bill Currie 2023-06-30 03:31:52 +09:00
parent 665d88c353
commit d45b76313c

View file

@ -198,11 +198,9 @@ parse_int32_t (const plfield_t *field, const plitem_t *item,
void *data, plitem_t *messages, void *context) void *data, plitem_t *messages, void *context)
{ {
int ret = 1; int ret = 1;
// use size_t (and cexpr_size_t) for val so references to array sizes int val = 0;
// can be used
size_t val = 0;
parsectx_t *pctx = context; parsectx_t *pctx = context;
exprval_t result = { &cexpr_size_t, &val }; exprval_t result = { &cexpr_int, &val };
exprctx_t ectx = *pctx->ectx; exprctx_t ectx = *pctx->ectx;
ectx.result = &result; ectx.result = &result;
ectx.item = item; ectx.item = item;