* so we don't turn things that look like URL's into
* links, when they're already links - or image sources.
*/
- if ((ptr > msg) && (*(ptr-1) == '<')) {
+ if ((ptr != NULL) && (ptr > msg) && (*(ptr-1) == '<')) {
++brak;
}
- if ((ptr > msg) && (*(ptr-1) == '>')) {
+ if ((ptr != NULL) && (ptr > msg) && (*(ptr-1) == '>')) {
--brak;
if ((scriptlevel == 0) && (script_start_pos >= 0)) {
StrBufCutRight(converted_msg, StrLength(converted_msg) - script_start_pos);
script_start_pos = (-1);
}
}
- if (!strncasecmp(ptr, "</A>", 3)) --alevel;
+ if ((ptr != NULL) &&
+ !strncasecmp(ptr, "</A>", 3))
+ --alevel;
}
}