X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fcolor_name.h;h=a9ea6a3e6009774258c83d0e28c4ccc707fec278;hp=81a3b3125759bfd426c7e0396b1bfed3a272b3c1;hb=22a4b929f47f85588dc07fddf98b09776cec658f;hpb=98d8891f42d8acac5c2ade39d163f386057a22e4 diff --git a/test/color_name.h b/test/color_name.h index 81a3b312..a9ea6a3e 100644 --- a/test/color_name.h +++ b/test/color_name.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2011,2012 Free Software Foundation, Inc. * + * Copyright (c) 2011-2012,2016 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: color_name.h,v 1.4 2012/11/18 01:59:32 tom Exp $ + * $Id: color_name.h,v 1.5 2016/09/04 20:11:36 tom Exp $ */ #ifndef __COLORNAME_H @@ -89,7 +89,7 @@ color_name(int color) const char *result = 0; if (color >= (int) SIZEOF(the_color_names)) { - sprintf(temp, "%d", color); + _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(result)) "%d", color); result = temp; } else if (color < 0) { result = "default";