Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/utils.c @ 2049:0ba755e5dc48
ut_expand_tabs: Check the argument is not null
It should never happen, but you never know...
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 28 Nov 2012 17:50:25 +0100 |
parents | 3695266e16c7 |
children | 998feaa54ef0 |
comparison
equal
deleted
inserted
replaced
2048:349e3c3eb874 | 2049:0ba755e5dc48 |
---|---|
674 { | 674 { |
675 char *xtext, *linestart; | 675 char *xtext, *linestart; |
676 char *p, *q; | 676 char *p, *q; |
677 guint n = 0, bc = 0; | 677 guint n = 0, bc = 0; |
678 | 678 |
679 if (!text) | |
680 return NULL; | |
681 | |
679 xtext = (char*)text; | 682 xtext = (char*)text; |
680 for (p=xtext; *p; p++) | 683 for (p=xtext; *p; p++) |
681 if (*p == '\t') | 684 if (*p == '\t') |
682 n++; | 685 n++; |
683 else if (*p == '\x0d') | 686 else if (*p == '\x0d') |