]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_tgoto.c
ncurses 6.4 - patch 20230418
[ncurses.git] / ncurses / tinfo / lib_tgoto.c
index 084a322fe95c8a05fdb26dd0d272d2b2c6f2cc62..58b561fa7c781610ee030d2a075466fe320d922f 100644 (file)
@@ -36,7 +36,7 @@
 #include <ctype.h>
 #include <termcap.h>
 
-MODULE_ID("$Id: lib_tgoto.c,v 1.22 2023/04/08 13:48:58 tom Exp $")
+MODULE_ID("$Id: lib_tgoto.c,v 1.23 2023/04/16 17:19:40 tom Exp $")
 
 #if !PURE_TERMINFO
 static bool
@@ -214,7 +214,9 @@ tgoto(const char *string, int x, int y)
         * using tgoto().  The internal _nc_tiparm() function returns a NULL
         * for that case; retry for the single-parameter case.
         */
-       result = TIPARM_1(string, y);
+       if ((result = TIPARM_1(string, y)) == NULL) {
+           result = TIPARM_0(string);
+       }
     }
     returnPtr(result);
 }