10 Jun
2008
10 Jun
'08
10:06 p.m.
Hi, Had a problem compiling the latest this morning with switch_channel.c [Line 1753] if (offset >= 0) { if (offset > strlen(sub_val)) { *sub_val = '\0'; } else { sub_val += offset; } } else if ((size_t) abs(offset) <= strlen(sub_val)) { sub_val = cloned_sub_val + (strlen(cloned_sub_val) + offset); } Changed to: if (offset >= 0) { if ((size_t)offset > strlen(sub_val)) { *sub_val = '\0'; } else { sub_val += offset; } } else if ((size_t) abs(offset) <= strlen(sub_val)) { sub_val = cloned_sub_val + (strlen(cloned_sub_val) + offset); } Basically added a cast to (size_t) for the second if. Wasnt too sure whether I needed to remove negatives like the else if lower down. Bob
6721
Age (days ago)
6721
Last active (days ago)
0 comments
1 participants
participants (1)
-
Bob Coleman