X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fbase64.c;h=0f1b0144baceec439a33d683f5b0ed477daa6f99;hb=a0040bd045e62e1f47852b1e1285fc0f0b34f78d;hp=fe1a7c4c0fb21c63d735366c6bfa428ce6825a28;hpb=073eb645cab590c7bf1a02d2547ac78b10b52068;p=libucw.git diff --git a/lib/base64.c b/lib/base64.c index fe1a7c4c..0f1b0144 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -1,8 +1,10 @@ /* - * Base 64 Encoding & Decoding + * UCW Library -- Base 64 Encoding & Decoding * * (c) 2002, Robert Spalek * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ #undef LOCAL_DEBUG @@ -59,7 +61,7 @@ uns base64_decode(byte *dest, byte *src, uns len) { byte *current = src; - byte ch; + uns ch; uns i = 0, j = 0; static byte reverse_table[256]; static uns table_built = 0; @@ -91,7 +93,7 @@ base64_decode(byte *dest, byte *src, uns len) headache. - Turadg Aleahmad */ - if (ch == ' ') ch = '+'; + if (ch == ' ') ch = '+'; ch = reverse_table[ch]; if (ch == 0xff) continue;