summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>1997-11-02 13:31:54 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-03-03 03:06:59 +0000
commitc10ed8b9e8edf0b40762507fd9f81cf68f67e9b2 (patch)
tree571c2cfaa25aaa76d4dd17fbce3804d0ce73f9d0 /sv.c
parent4b74e3fbc56175eeb65af1e5ad28a26e76ba64d9 (diff)
downloadperl-c10ed8b9e8edf0b40762507fd9f81cf68f67e9b2.tar.gz
[win32] still another maintpatch
Message-Id: <199711021331.NAA01826@crypt.compulink.co.uk> Subject: [PATCH] assorted sprintf bugs p4raw-id: //depot/win32/perl@631
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 2c5f4df470..d4edad45f3 100644
--- a/sv.c
+++ b/sv.c
@@ -4573,6 +4573,8 @@ sv_vcatpvfn(SV *sv, const char *pat, STRLEN patlen, va_list *args, SV **svargs,
switch (base) {
unsigned dig;
case 16:
+ if (!uv)
+ alt = FALSE;
p = (c == 'X') ? "0123456789ABCDEF" : "0123456789abcdef";
do {
dig = uv & 15;
@@ -4599,8 +4601,12 @@ sv_vcatpvfn(SV *sv, const char *pat, STRLEN patlen, va_list *args, SV **svargs,
break;
}
elen = (ebuf + sizeof ebuf) - eptr;
- if (has_precis && precis > elen)
- zeros = precis - elen;
+ if (has_precis) {
+ if (precis > elen)
+ zeros = precis - elen;
+ else if (precis == 0 && elen == 1 && *eptr == '0')
+ elen = 0;
+ }
break;
/* FLOATING POINT */