|
Yes, You know that, compiler does not. Compiler only does know that we enter luaX_token2str(LexState *ls, int token) and int is 32-bit value, meaning that it is possible to construct code path with token == 256, and in such case, we read outside array bounds. So, as the assumption is that 256 is impossible value, we can set up assert or condition to test that value. rgds, toomas |