strptime: fix bug introduced in r272273.

Reported by:	portmgr (antoine)
Fix by:		Andrey Chernov, David Carlier
PR:		137307 (follow up)
This commit is contained in:
Pedro F. Giffuni 2014-10-01 22:18:07 +00:00
parent 939a050ad9
commit 1a6804c649

View File

@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
#include "timelocal.h"
#include "tzfile.h"
#include <stdio.h>
static char * _strptime(const char *, const char *, struct tm *, int *, locale_t);
#define asizeof(a) (sizeof(a) / sizeof((a)[0]))
@ -342,6 +342,7 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
if (i == asizeof(tptr->weekday))
return (NULL);
buf += len;
tm->tm_wday = i;
flags |= FLAG_WDAY;
break;