Arnaud Desitter points out a silly mistake in retrieve_cutbuffer()
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 24 May 2004 11:30:15 +0000 (11:30 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
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!).

git-svn-id: svn://svn.tartarus.org/sgt/putty@4254 cda61777-01e9-0310-a592-d414129be87e

unix/pterm.c

index c52b920..87339fb 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;
     }