[libcxx-commits] [PATCH] D124175: [libcxx] Reject month 0 in get_date/__get_month
David Spickett via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 21 07:39:16 PDT 2022
DavidSpickett added inline comments.
================
Comment at: libcxx/include/locale:1928
int __t = __get_up_to_n_digits(__b, __e, __err, __ct, 2) - 1;
- if (!(__err & ios_base::failbit) && __t <= 11)
+ if (!(__err & ios_base::failbit) && 0 <= __t && __t <= 11)
__m = __t;
----------------
If this way of writing the comparison seems strange, I'm matching __get_day above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124175/new/
https://reviews.llvm.org/D124175
More information about the libcxx-commits
mailing list