aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2007-04-17 06:10:53 +1000
committerGravatar axel <axel@liljencrantz.se>2007-04-17 06:10:53 +1000
commit5c9570eb56126dda8f5319f94924a0b1b9e498ce (patch)
tree714f1711d9b03623f985afce948525482597a499 /builtin.c
parent778b6a31adc195b2fa89d120af57fe707b4f84d3 (diff)
Minor code tweaks
darcs-hash:20070416201053-ac50b-99d3ee51ef2b3642c737c3809bc2a4bfbe103b67.gz
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin.c b/builtin.c
index dec4db22..0bdab295 100644
--- a/builtin.c
+++ b/builtin.c
@@ -283,14 +283,12 @@ static void builtin_print_help( const wchar_t *cmd, string_buffer_t *b )
*/
pos = str;
- for( i=0; i<4; i++ )
+ for( i=0; (i<4) && pos && *pos; i++ )
{
pos = wcschr( pos+1, L'\n' );
- if( !pos )
- break;
}
- if( pos )
+ if( pos && *pos )
{
/*