X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fcolor_name.h;h=0964dce15990d7beeb093f1ea4ceea4679b5b989;hp=ff82d4647d2bc87e06e13128a8154c33e6e35c94;hb=a108bc76f220a81a223a5c25f59195af60452128;hpb=950eed9ace2ceff30b88c20de1ef8a0ba05ac567 diff --git a/test/color_name.h b/test/color_name.h index ff82d464..0964dce1 100644 --- a/test/color_name.h +++ b/test/color_name.h @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: color_name.h,v 1.2 2011/04/23 17:15:01 tom Exp $ + * $Id: color_name.h,v 1.3 2011/05/14 17:41:17 tom Exp $ */ #ifndef __COLORNAME_H @@ -64,7 +64,7 @@ color_code(const char *color) char *endp = 0; size_t n; - if ((result = strtol(color, &endp, 0)) >= 0 + if ((result = (int) strtol(color, &endp, 0)) >= 0 && (endp == 0 || *endp == 0)) { ; } else if (!strcmp(color, "default")) {