]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Arnaud Desitter points out a silly mistake in retrieve_cutbuffer()
authorSimon Tatham <anakin@pobox.com>
Mon, 24 May 2004 11:30:15 +0000 (11:30 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 24 May 2004 11:30:15 +0000 (11:30 +0000)
(don't test for `int *nbytes' being <= 0, test for the integer it
points to being <= 0!).

[originally from svn r4254]

unix/pterm.c

index c52b920872b37f56ce77f32e9aa1ff6ff158f1a8..87339fb46e31881e2ba30e0a271cd62e4a9314aa 100644 (file)
@@ -1371,7 +1371,7 @@ char * retrieve_cutbuffer(int * nbytes)
 {
     char * ptr;
     ptr = XFetchBytes(GDK_DISPLAY(), nbytes);
-    if (nbytes <= 0 && ptr != 0) {
+    if (*nbytes <= 0 && ptr != 0) {
        XFree(ptr);
        ptr = 0;
     }