fix off by one

This commit is contained in:
Eliot Horowitz
2010-07-14 13:23:08 -04:00
parent f43702ccfd
commit 6cebdef81d

View File

@@ -222,7 +222,8 @@ char * shellReadline( const char * prompt , int handlesigint = 0 ){
char * buf = new char[1024];
char * l = fgets( buf , 1024 , stdin );
int len = strlen( buf );
buf[len-1] = 0;
if ( len )
buf[len-1] = 0;
return l;
#endif
}