Fix MSVC warnings in js.cpp
authorDavid Mandelin <dmandelin@mozilla.com>
Tue, 23 Nov 2010 14:41:35 -0800
changeset 58288 030db8b3b22ca698cb5b7e4b496386881b207d0f
parent 58287 8cdcb8f8aadbee7d4d2eea47174d3a78c4563f5a
child 58289 1829374e7d19409857e3f79a21ef5f1dfab12fc3
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
milestone2.0b8pre
Fix MSVC warnings in js.cpp
js/src/shell/js.cpp
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -2076,18 +2076,18 @@ static JSBool
 Disassemble(JSContext *cx, uintN argc, jsval *vp)
 {
     jsval *argv = JS_ARGV(cx, vp);
 
     /* Read options off early arguments */
     bool lines = false, recursive = false;
     while (argc > 0 && JSVAL_IS_STRING(argv[0])) {
         JSString *str = JSVAL_TO_STRING(argv[0]);
-        lines |= JS_MatchStringAndAscii(str, "-l");
-        recursive |= JS_MatchStringAndAscii(str, "-r");
+        lines |= !!JS_MatchStringAndAscii(str, "-l");
+        recursive |= !!JS_MatchStringAndAscii(str, "-r");
         if (!lines && !recursive)
             break;
         argv++, argc--;
     }
 
     for (uintN i = 0; i < argc; i++) {
         if (!DisassembleValue(cx, argv[i], lines, recursive))
             return false;