Skip to content

Commit

Permalink
Fix switch case compilation error in the new helloscripting
Browse files Browse the repository at this point in the history
It is missing the curly braces.

Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Dec 22, 2024
1 parent 6adef8e commit e7fdeba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/modules/helloscripting.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,18 +213,20 @@ static uint32_t executeHelloLangFunction(HelloFunc *func,
case CONSTI:
stack[sp++] = instr.param.integer;
break;
case ARGS:
case ARGS: {
uint32_t idx = instr.param.integer;
ValkeyModule_Assert(idx < (uint32_t)nargs);
size_t len;
const char *argStr = ValkeyModule_StringPtrLen(args[idx], &len);
uint32_t arg = str2int(argStr);
stack[sp++] = arg;
break;
case RETURN:
}
case RETURN: {
uint32_t val = stack[--sp];
ValkeyModule_Assert(sp == 0);
return val;
}
case FUNCTION:
default:
ValkeyModule_Assert(0);
Expand Down

0 comments on commit e7fdeba

Please sign in to comment.