zoomsh: fix SEGV for set command wo value
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 17 Aug 2011 13:50:11 +0000 (15:50 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 17 Aug 2011 13:50:11 +0000 (15:50 +0200)
zoom/zoomsh.c

index fea2181..2126f30 100644 (file)
@@ -120,7 +120,7 @@ static void cmd_set(ZOOM_connection *c, ZOOM_resultset *r,
         return ;
     }
     val_len = next_token_chars(args, &val_buf, "");
-    if (val_len)
+    if (val_len != -1)
         ZOOM_options_setl(options, wrbuf_cstr(key), val_buf, val_len);
     else
         ZOOM_options_set(options, wrbuf_cstr(key), 0);