mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed bug in base64_encode
SVN revision: 473
This commit is contained in:
parent
fccf1c6815
commit
17e38d9b25
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.67 2003/04/04 20:50:15 midas
|
||||||
|
Fixed bug in base64_encode
|
||||||
|
|
||||||
Revision 1.66 2003/04/04 11:00:22 midas
|
Revision 1.66 2003/04/04 11:00:22 midas
|
||||||
Removed 'admin' command, added link 'change elogd.cfg' on config page instead
|
Removed 'admin' command, added link 'change elogd.cfg' on config page instead
|
||||||
|
|
||||||
@ -1240,9 +1243,11 @@ void base64_encode(char *s, char *d)
|
|||||||
unsigned int t, pad;
|
unsigned int t, pad;
|
||||||
|
|
||||||
pad = 3 - strlen(s) % 3;
|
pad = 3 - strlen(s) % 3;
|
||||||
|
if (pad == 3)
|
||||||
|
pad = 0;
|
||||||
while (*s)
|
while (*s)
|
||||||
{
|
{
|
||||||
t = (*s++) << 16;
|
t = (*s++) << 16;
|
||||||
if (*s)
|
if (*s)
|
||||||
t |= (*s++) << 8;
|
t |= (*s++) << 8;
|
||||||
if (*s)
|
if (*s)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user