We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 919d6a7 commit cc9627bCopy full SHA for cc9627b
libexslt/date.c
@@ -244,12 +244,14 @@ _exsltDateParseGYear (exsltDateValPtr dt, const xmlChar **str)
244
static void
245
exsltFormatGYear(xmlChar **cur, xmlChar *end, long yr)
246
{
247
+ long year;
248
+ xmlChar tmp_buf[100], *tmp = tmp_buf, *tmp_end = tmp_buf + 99;
249
+
250
if (yr <= 0 && *cur < end) {
251
*(*cur)++ = '-';
252
}
253
- long year = (yr <= 0) ? -yr + 1 : yr;
- xmlChar tmp_buf[100], *tmp = tmp_buf, *tmp_end = tmp_buf + 99;
254
+ year = (yr <= 0) ? -yr + 1 : yr;
255
/* result is in reverse-order */
256
while (year > 0 && tmp < tmp_end) {
257
*tmp++ = '0' + (xmlChar)(year % 10);
0 commit comments