X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Fvsscanf.c;h=ef524250c36f358a7821e8c0b52603100d1a9bd9;hp=e6253c3a38a3365dea2404da089065bfbb228547;hb=7f4b9f390624835ceb0849965a7f6ff2dcb39d00;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;ds=sidebyside diff --git a/ncurses/base/vsscanf.c b/ncurses/base/vsscanf.c index e6253c3a..ef524250 100644 --- a/ncurses/base/vsscanf.c +++ b/ncurses/base/vsscanf.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2004,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -38,7 +39,7 @@ #if !HAVE_VSSCANF -MODULE_ID("$Id: vsscanf.c,v 1.18 2004/04/03 20:27:02 tom Exp $") +MODULE_ID("$Id: vsscanf.c,v 1.21 2020/02/02 23:34:34 tom Exp $") #if !(HAVE_VFSCANF || HAVE__DOSCAN) @@ -293,12 +294,12 @@ vsscanf(const char *str, const char *format, va_list ap) /* add %n, if the format was not that */ if (chunk != cAssigned) { - strcat(my_fmt, "%n"); + _nc_STRCAT(my_fmt, "%n", len_fmt); } switch (chunk) { case cAssigned: - strcat(my_fmt, "%n"); + _nc_STRCAT(my_fmt, "%n", len_fmt); pointer = &eaten; break; case cInt: