# HG changeset patch # User Matti Hamalainen # Date 1287945497 -10800 # Node ID c4865ac2386c27ae325066ee131536449aca2364 # Parent 9db08807018fbd5e7fd8e4c17f765c02564ff283 Fix right-side trimming of command line. diff -r 9db08807018f -r c4865ac2386c nnchat.c --- a/nnchat.c Sun Oct 24 18:44:59 2010 +0300 +++ b/nnchat.c Sun Oct 24 21:38:17 2010 +0300 @@ -559,7 +559,8 @@ BOOL result; /* Trim right */ - buf[--bufLen] = 0; + bufLen--; + buf[bufLen--] = 0; while (bufLen > 0 && (buf[bufLen] == '\n' || buf[bufLen] == '\r' || th_isspace(buf[bufLen]))) buf[bufLen--] = 0; @@ -585,7 +586,7 @@ snprintf(tmpBuf, sizeof(tmpBuf), "firefox -remote \"openurl(http://www.newbienudes.com/profile/%s/,new-tab)\"", tmpStr); th_free(tmpStr); - printMsg("Opening profile for: %s\n", name); + printMsg("Opening profile for: '%s'\n", name); printMsg("%s\n", tmpBuf); system(tmpBuf); return 0;