diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-06-05 16:42:10 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-06-08 11:47:46 (GMT) |
| commit | 22b3ae927520be81a1b42a626837fec3a1238917 (patch) | |
| tree | 6b051bc965707c1a022e49f7108845eb159272a8 /src | |
| parent | e182e7422cc5670dc9217ac12bba7ba12542678d (diff) | |
| download | powder-22b3ae927520be81a1b42a626837fec3a1238917.zip powder-22b3ae927520be81a1b42a626837fec3a1238917.tar.gz | |
Fix tpt.get_name and limit tpt.log message length
Diffstat (limited to 'src')
| -rw-r--r-- | src/luaconsole.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c index 8fd137b..0109f9f 100644 --- a/src/luaconsole.c +++ b/src/luaconsole.c @@ -205,7 +205,7 @@ int luatpt_log(lua_State* l) { char *buffer; buffer = luaL_optstring(l, 1, ""); - strcpy(console_error, buffer); + strncpy(console_error, buffer, 254); return 0; } @@ -626,10 +626,10 @@ int luatpt_textwidth(lua_State* l) int luatpt_get_name(lua_State* l) { if (svf_login){ - lua_pushstring(l, ""); + lua_pushstring(l, svf_user); return 1; } - lua_pushstring(l, svf_user); + lua_pushstring(l, ""); return 1; } |
