]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_tputs.c
ncurses 6.4 - patch 20230917
[ncurses.git] / ncurses / tinfo / lib_tputs.c
index 7aa30f5f686feaab860c7bda86127978d8b32edc..f834532c91936f24fcfb58ef637e73e8d9a5ae1a 100644 (file)
@@ -52,7 +52,7 @@
 #include <termcap.h>           /* ospeed */
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tputs.c,v 1.110 2023/04/22 15:12:57 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.111 2023/09/16 16:05:15 tom Exp $")
 
 NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
 NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
@@ -89,6 +89,9 @@ NCURSES_SP_NAME(delay_output) (NCURSES_SP_DCLx int ms)
 {
     T((T_CALLED("delay_output(%p,%d)"), (void *) SP_PARM, ms));
 
+    if (ms > MAX_DELAY_MSECS)
+       ms = MAX_DELAY_MSECS;
+
     if (!HasTInfoTerminal(SP_PARM))
        returnCode(ERR);