/[weechat]/weechat/src/gui/curses/gui-display.c
ViewVC logotype

Diff of /weechat/src/gui/curses/gui-display.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.128 by flashcode, Thu Nov 10 08:54:45 2005 UTC revision 1.129 by flashcode, Fri Nov 11 23:01:21 2005 UTC
# Line 349  gui_color_encode (unsigned char *string) Line 349  gui_color_encode (unsigned char *string)
349      unsigned char *out;      unsigned char *out;
350      int out_length, out_pos;      int out_length, out_pos;
351            
352      out_length = strlen ((char *)string) + 1;      out_length = (strlen ((char *)string) * 2) + 1;
353      out = (unsigned char *)malloc (out_length);      out = (unsigned char *)malloc (out_length);
354      if (!out)      if (!out)
355          return NULL;          return NULL;
# Line 363  gui_color_encode (unsigned char *string) Line 363  gui_color_encode (unsigned char *string)
363                  string++;                  string++;
364                  switch (string[0])                  switch (string[0])
365                  {                  {
366                        case '\0':
367                            out[out_pos++] = '%';
368                            break;
369                      case '%': /* double '%' replaced by single '%' */                      case '%': /* double '%' replaced by single '%' */
370                          out[out_pos++] = string[0];                          out[out_pos++] = string[0];
371                          string++;                          string++;

Legend:
Removed from v.1.128  
changed lines
  Added in v.1.129

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26