Software /
code /
prosody
Comparison
util-src/encodings.c @ 601:6cb908ef01c8
Fixed util.encodings.base64.decode to not truncate results when encountering an '=' before the end of the given input.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 08 Dec 2008 03:19:11 +0500 |
parent | 520:e96ac4bb6dd8 |
child | 766:433a5226267f |
comparison
equal
deleted
inserted
replaced
600:2255a2e84ddc | 601:6cb908ef01c8 |
---|---|
108 { | 108 { |
109 case 1: base64_decode(&b,t[0],0,0,0,1); break; | 109 case 1: base64_decode(&b,t[0],0,0,0,1); break; |
110 case 2: base64_decode(&b,t[0],t[1],0,0,2); break; | 110 case 2: base64_decode(&b,t[0],t[1],0,0,2); break; |
111 case 3: base64_decode(&b,t[0],t[1],t[2],0,3); break; | 111 case 3: base64_decode(&b,t[0],t[1],t[2],0,3); break; |
112 } | 112 } |
113 n=0; | |
114 break; | |
113 case 0: | 115 case 0: |
114 luaL_pushresult(&b); | 116 luaL_pushresult(&b); |
115 return 1; | 117 return 1; |
116 case '\n': case '\r': case '\t': case ' ': case '\f': case '\b': | 118 case '\n': case '\r': case '\t': case ' ': case '\f': case '\b': |
117 break; | 119 break; |