X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fcolor_name.h;h=d27804e87266dac9b5bafbe7f39c12a2bef076c0;hp=5ec4dcbf990e032a1c894a9de70360d707aa33fe;hb=9b4c4abadc0a29999c5ddad5aa8d769fee28d687;hpb=bfe3845eb1a2ff02a740e917b537e939ec4e44cb;ds=sidebyside diff --git a/test/color_name.h b/test/color_name.h index 5ec4dcbf..d27804e8 100644 --- a/test/color_name.h +++ b/test/color_name.h @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 2011-2016,2018 Free Software Foundation, Inc. * + * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 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 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: color_name.h,v 1.6 2018/12/29 15:19:30 tom Exp $ + * $Id: color_name.h,v 1.8 2020/06/20 18:58:20 tom Exp $ */ #ifndef __COLORNAME_H @@ -89,7 +90,7 @@ color_name(int color) const char *result = 0; if (color >= (int) SIZEOF(the_color_names)) { - _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(result)) "%d", color); + _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "%d", color); result = temp; } else if (color < 0) { result = "default";