]> granicus.if.org Git - nethack/commitdiff
utf8 warning fix
authorPatR <rankin@nethack.org>
Thu, 9 Jun 2022 07:28:44 +0000 (00:28 -0700)
committerPatR <rankin@nethack.org>
Thu, 9 Jun 2022 07:28:44 +0000 (00:28 -0700)
Avoid gcc/clang warning about mixing || with && without parentheses.
The code already worked as intended despite the warning.

src/symbols.c

index 42fbbd1ea1a4dd9a8f4ebd4f10927bbd23372ff8..599138b11ceb828347a1c6a4b6c1e7ea986e08b0 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 symbols.c       $NHDT-Date: 1596498214 2020/08/03 23:43:34 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.77 $ */
+/* NetHack 3.7 symbols.c       $NHDT-Date: 1654759698 2022/06/09 07:28:18 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.87 $ */
 /* Copyright (c) NetHack Development Team 2020.                   */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -703,8 +703,8 @@ parsesymbols(register char *opts, int which_set)
             int glyph;
 #endif
 
-            if ((g.symset[which_set].handling == H_UTF8)
-                || (lowc(strval[0]) == 'u') && (strval[1] == '+')) {
+            if (g.symset[which_set].handling == H_UTF8
+                || (lowc(strval[0]) == 'u' && strval[1] == '+')) {
 #ifdef ENHANCED_SYMBOLS
                 char buf[BUFSZ];