]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Log file open mode lost a "b" in r5344. Windows at least needs log files to
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 19 Feb 2005 01:20:16 +0000 (01:20 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 19 Feb 2005 01:20:16 +0000 (01:20 +0000)
be written in binary mode with the current code.

[originally from svn r5353]
[r5344 == f73fcb042423866a06b9e41b6934906a0fe9502e]

logging.c

index cb9c536b5f25a6cb7860743bd331a282e09ec35e..ab765b3b4774bed84b2bfb135d0aa1e78e10da9e 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -80,7 +80,7 @@ static void logfopen_callback(void *handle, int mode)
     if (mode == 0) {
        ctx->state = L_ERROR;          /* disable logging */
     } else {
-       fmode = (mode == 1 ? "a" : "w");
+       fmode = (mode == 1 ? "ab" : "wb");
        ctx->lgfp = f_open(ctx->currlogfilename, fmode);
        if (ctx->lgfp)
            ctx->state = L_OPEN;