aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Harrison <colin.harrison@virgin.net>2017-12-07 10:57:06 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-12-10 12:17:10 +0100
commitc281c6e06a1c9ff65e5ea00d172ea42806fb677f (patch)
tree9b125ba8fd5e4b9d2266e0fc316c3b74fc283fbf
parent1e3a97482840401af9ffcf73db6008ebfe6c1d52 (diff)
downloadnx-libs-c281c6e06a1c9ff65e5ea00d172ea42806fb677f.tar.gz
nx-libs-c281c6e06a1c9ff65e5ea00d172ea42806fb677f.tar.bz2
nx-libs-c281c6e06a1c9ff65e5ea00d172ea42806fb677f.zip
Typo in xserver Xvasprintf()
Backported from X.org: commit 1324b0ca9f8a7fdaf03b374c75eb3c9df407c2f1 Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Dec 10 00:08:24 2010 +0000 Typo in xserver Xvasprintf() I needed this patch in the wrapper around vsnprintf() in os/xprintf.c (MinGW for Windows build) to correct various crashes. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Mihai Moldovan <ionic@ionic.de>
-rw-r--r--nx-X11/programs/Xserver/os/xprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/os/xprintf.c b/nx-X11/programs/Xserver/os/xprintf.c
index de56de0d1..58e0d507d 100644
--- a/nx-X11/programs/Xserver/os/xprintf.c
+++ b/nx-X11/programs/Xserver/os/xprintf.c
@@ -128,7 +128,7 @@ Xvasprintf(char **ret, const char *_X_RESTRICT_KYWD format, va_list va)
}
else
{
- ret[r] = 0;
+ (*ret)[r] = 0;
return r;
}
}
@@ -164,7 +164,7 @@ Xvasprintf(char **ret, const char *_X_RESTRICT_KYWD format, va_list va)
return -1;
vsnprintf(*ret, size + 1, format, va);
- ret[size] = 0;
+ (*ret)[size] = 0;
return size;
#endif
}