diff options
| author | ruki <[email protected]> | 2017-05-03 08:59:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-03 08:59:01 +0800 |
| commit | d05c6f778f125e94488fb785a2176e2854d98442 (patch) | |
| tree | 963d567bf428cf9d47985777ad78876dca764538 /core/src/xmake | |
| parent | 3f0dc41d0e8af58b17c289492b68f21e4755c36e (diff) | |
fix compile error on win64
Diffstat (limited to 'core/src/xmake')
| -rw-r--r-- | core/src/xmake/sandbox/interactive.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/xmake/sandbox/interactive.c b/core/src/xmake/sandbox/interactive.c index add1e0510..12aeafa2d 100644 --- a/core/src/xmake/sandbox/interactive.c +++ b/core/src/xmake/sandbox/interactive.c @@ -160,8 +160,8 @@ static tb_int_t pushline(lua_State *lua, tb_int_t firstline) if (fgets(buffer, sizeof(buffer), stdin)) { // split line '\0' - tb_int_t n = tb_strlen(buffer); - if (n > 0 && buffer[n - 1] == '\n') + tb_size_t n = tb_strlen(buffer); + if (n < sizeof(buffer) && buffer[n - 1] == '\n') buffer[n - 1] = '\0'; // eval expression? .e.g = 1 + 2 * .. |
