Mercurial > pidgin
comparison src/protocols/yahoo/yahoo.c @ 2813:bda5b89ba2f9
[gaim-migrate @ 2826]
helps to nul-terminate strings.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 29 Nov 2001 08:39:55 +0000 |
parents | f01e6a425136 |
children | cbe6a1e63a72 |
comparison
equal
deleted
inserted
replaced
2812:90ccd9a2b7bb | 2813:bda5b89ba2f9 |
---|---|
477 int i, j; | 477 int i, j; |
478 strip_linefeed(msg); | 478 strip_linefeed(msg); |
479 m = msg; | 479 m = msg; |
480 for (i = 0, j = 0; m[i]; i++) { | 480 for (i = 0, j = 0; m[i]; i++) { |
481 if (m[i] == 033) { | 481 if (m[i] == 033) { |
482 while (m[i] != 'm') | 482 while (m[i] && (m[i] != 'm')) |
483 i++; | 483 i++; |
484 if (!m[i]) | |
485 i--; | |
484 continue; | 486 continue; |
485 } | 487 } |
486 msg[j++] = m[i]; | 488 msg[j++] = m[i]; |
487 } | 489 } |
490 msg[j] = 0; | |
488 serv_got_im(gc, from, msg, 0, tm); | 491 serv_got_im(gc, from, msg, 0, tm); |
489 } else if (pkt->status == 2) { | 492 } else if (pkt->status == 2) { |
490 do_error_dialog(_("Your message did not get sent."), _("Gaim - Error")); | 493 do_error_dialog(_("Your message did not get sent."), _("Gaim - Error")); |
491 } | 494 } |
492 } | 495 } |