From 63e5e2a262d22696fe1984a930dca8b08b536d27 Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Fri, 24 Apr 2009 14:21:51 +0200 Subject: [PATCH] If yset is empty, accepts as a true set. --- mpdm_s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpdm_s.c b/mpdm_s.c index 18a4399..7d59bbd 100644 --- a/mpdm_s.c +++ b/mpdm_s.c @@ -1,7 +1,7 @@ /* MPDM - Minimum Profit Data Manager - Copyright (C) 2003/2007 Angel Ortega + Copyright (C) 2003/2009 Angel Ortega mpdm_s.c - String management @@ -1065,7 +1065,7 @@ mpdm_t mpdm_scanf(const mpdm_t string, const mpdm_t format) } /* now fill the dynamic string */ - while (vsize && !wcschr(nset, *i) && wcschr(yset, *i)) { + while (vsize && !wcschr(nset, *i) && (yset[0] == L'\0' || wcschr(yset, *i))) { ptr = mpdm_poke(ptr, &size, i, 1, sizeof(wchar_t)); i++; vsize--; -- 2.11.4.GIT