Fix line-wrapping bug in baseconv.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 11 Jul 2007 17:35:18 +0000 (17:35 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 11 Jul 2007 17:35:18 +0000 (17:35 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@1089 959494ce-11ee-0310-bf91-de5d638817bd

config/baseconv.c

index d27a8cf..56c8d2d 100644 (file)
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
                if(linelen + buflen > 60) {
                    fwrite(encbuf, 1, 60 - linelen, stdout);
                    fwrite("\n", 1, 1, stdout);
-                   buflen -= 60 - linelen;
+                   memmove(encbuf, encbuf + 60 - linelen, buflen -= 60 - linelen);
                }
                fwrite(encbuf, 1, buflen, stdout);
                linelen += buflen;