summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
authorCracker64 <cracker642@gmail.com>2011-02-01 03:53:32 (GMT)
committer Cracker64 <cracker642@gmail.com>2011-02-01 03:53:32 (GMT)
commitfea297b2ac430a6e4d32a9842d8904a04989d495 (patch)
treef7ac16c065d8ea9d7f36b937af0d80ae32d4c98c /src/interface.c
parentc1ca8bae2980fba045fbd881a18a9e75c14361aa (diff)
downloadpowder-fea297b2ac430a6e4d32a9842d8904a04989d495.zip
powder-fea297b2ac430a6e4d32a9842d8904a04989d495.tar.gz
Update with simon, and drawing SPRK on walls crash fix.
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c
index 112fef4..5940e6e 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -867,11 +867,19 @@ void login_ui(pixel *vid_buf)
if (res && !strncmp(res, "OK ", 3))
{
char *s_id,*u_e,*nres;
+ printf("\n{%s}\n", res);
s_id = strchr(res+3, ' ');
+ if (!s_id)
+ goto fail;
*(s_id++) = 0;
u_e = strchr(s_id, ' ');
- *(u_e++) = 0;
+ if (!u_e){
+ u_e = malloc(1);
+ memset(u_e, 0, 1);
+ }
+ else
+ *(u_e++) = 0;
strcpy(svf_user_id, res+3);
strcpy(svf_session_id, s_id);