OSDN Git Service
(root)
/
openpts
/
openpts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68f3c43
)
fixed for the base64 string that has CR in the middle
author
sage
<seiji.munetoh@gmail.com>
Tue, 29 Nov 2011 22:11:30 +0000
(07:11 +0900)
committer
sage
<seiji.munetoh@gmail.com>
Tue, 29 Nov 2011 22:11:30 +0000
(07:11 +0900)
src/base64.c
patch
|
blob
|
history
diff --git
a/src/base64.c
b/src/base64.c
index
4784095
..
7b4b380
100644
(file)
--- a/
src/base64.c
+++ b/
src/base64.c
@@
-188,6
+188,8
@@
unsigned char _b64trans(unsigned char in) {
/**
* string length without space at the end
+ *
+ * 2011-11-30 Munetoh - fixed to skip the char in the middle of string
*/
int _strippedlength(char * in, int len) {
int skip = 0;
@@
-196,16
+198,13
@@
int _strippedlength(char * in, int len) {
/* last char */
i = len - 1;
- while(
1
) {
+ while(
i > 0
) {
if (in[i] == '\n') {
/* skip */
skip++;
} else if (in[i] == ' ') {
/* skip */
skip++;
- } else {
- /* valid data */
- break;
}
i = i - 1;
}