diff options
author | Hugo van der Sanden <hv@crypt.org> | 1997-11-02 13:31:54 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-03-03 03:06:59 +0000 |
commit | c10ed8b9e8edf0b40762507fd9f81cf68f67e9b2 (patch) | |
tree | 571c2cfaa25aaa76d4dd17fbce3804d0ce73f9d0 /sv.c | |
parent | 4b74e3fbc56175eeb65af1e5ad28a26e76ba64d9 (diff) | |
download | perl-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.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 */ |