mcabber/src/screen.c
changeset 1417 783b47c9d963
parent 1414 366ef500c522
child 1423 757ebe4df0b9
equal deleted inserted replaced
1416:7f0da8de2a7d 1417:783b47c9d963
   242 
   242 
   243 static int FindColor(const char *name)
   243 static int FindColor(const char *name)
   244 {
   244 {
   245   int result = FindColorInternal(name);
   245   int result = FindColorInternal(name);
   246   if (result != -2)
   246   if (result != -2)
       
   247     return result;
       
   248 
       
   249   // Directly support 256-color values
       
   250   result = atoi(name);
       
   251   if (result > 0 && result < COLORS)
   247     return result;
   252     return result;
   248 
   253 
   249   scr_LogPrint(LPRINT_LOGNORM, "ERROR: Wrong color: %s", name);
   254   scr_LogPrint(LPRINT_LOGNORM, "ERROR: Wrong color: %s", name);
   250   return -1;
   255   return -1;
   251 }
   256 }