Mercurial > pidgin
comparison src/util.c @ 6087:6e24de5efdb2
[gaim-migrate @ 6546]
"Man I'd like to violate her ANSI C"
This should fix some odd tobase64edness. Thanks to Paco-Paco for telling
us how to fix it 7 times.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Fri, 11 Jul 2003 04:38:40 +0000 |
| parents | 74b281b4ae29 |
| children | b6d204635cd2 |
comparison
equal
deleted
inserted
replaced
| 6086:8aad1be2e4d4 | 6087:6e24de5efdb2 |
|---|---|
| 321 | 321 |
| 322 /* This was borrowed from the Kame source, and then tweaked to our needs */ | 322 /* This was borrowed from the Kame source, and then tweaked to our needs */ |
| 323 char *tobase64(const unsigned char *buf, size_t len) | 323 char *tobase64(const unsigned char *buf, size_t len) |
| 324 { | 324 { |
| 325 char *s = NULL, *rv = NULL; | 325 char *s = NULL, *rv = NULL; |
| 326 unsigned char tmp; | 326 unsigned long tmp; |
| 327 | 327 |
| 328 s = g_malloc((4 * (len + 1)) / 3 + 1); | 328 s = g_malloc((4 * (len + 1)) / 3 + 1); |
| 329 | 329 |
| 330 rv = s; | 330 rv = s; |
| 331 while (len >= 3) { | 331 while (len >= 3) { |
