Declaration following a label is a C23 extension

No newline at EOF is UB
This commit is contained in:
GenericHeroGuy 2025-11-16 23:32:19 +01:00 committed by yamamama
parent f48317a045
commit f47e123c8b

View file

@ -135,6 +135,7 @@ static int voice_set(lua_State* L)
case voicevars_name:
return RNOSET;
case voicevars_parent:
{
// It would make no sense not to accept a skin struct here.
skin_t* my_new_parent = *((skin_t**)luaL_checkudata(L, 3, META_SKIN));
@ -147,6 +148,7 @@ static int voice_set(lua_State* L)
voice->parent = (UINT16)(my_new_parent - skins);
}
break;
}
case voicevars_win:
// For the actual sound values, you pass the actual sfxenum_t enums.
// Yes, I know what I said about skin structs literally just above.
@ -342,4 +344,4 @@ int LUA_VoiceLib(lua_State* L)
lua_setglobal(L, "skinvoices");
return 0;
}
}