Skip to content

Commit aaa8707

Browse files
committed
Re-generate outdated parse_date.c file
1 parent 81e0367 commit aaa8707

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎ext/date/lib/parse_date.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Generated by re2c 1.0.3 on Wed Jan 14 14:20:50 2026 */
1+
/* Generated by re2c 1.0.3 on Sun Oct 4 18:25:15 2026 */
22
#line 1 "ext/date/lib/parse_date.re"
33
/*
44
* The MIT License (MIT)
@@ -557,7 +557,6 @@ static timelib_ull timelib_get_signed_nr(Scanner *s, const char **ptr, int max_l
557557
int len = 0;
558558

559559
/* Skip over non-numeric chars */
560-
561560
while (((**ptr < '0') || (**ptr > '9')) && (**ptr != '+') && (**ptr != '-')) {
562561
if (**ptr == '\0') {
563562
add_error(s, TIMELIB_ERR_UNEXPECTED_DATA, "Found unexpected data");
@@ -571,6 +570,7 @@ static timelib_ull timelib_get_signed_nr(Scanner *s, const char **ptr, int max_l
571570
str[0] = '+'; /* First position is the sign */
572571
str_ptr = str + 1;
573572

573+
574574
while ((**ptr == '+') || (**ptr == '-')) {
575575
if (**ptr == '-') {
576576
str[0] = str[0] == '+' ? '-' : '+';
@@ -24870,7 +24870,7 @@ timelib_time *timelib_strtotime(const char *s, size_t len, timelib_error_contain
2487024870
in.errors->error_messages = NULL;
2487124871

2487224872
if (len > 0) {
24873-
while (isspace((unsigned char)*s) && s < e) {
24873+
while (isspace((unsigned char)*s) && s <= e) {
2487424874
s++;
2487524875
}
2487624876
while (isspace((unsigned char)*e) && e > s) {

‎ext/date/tests/bug35499.phpt‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ array(12) {
6969
array(0) {
7070
}
7171
["error_count"]=>
72-
int(0)
72+
int(1)
7373
["errors"]=>
74-
array(0) {
74+
array(1) {
75+
[0]=>
76+
string(12) "Empty string"
7577
}
7678
["is_localtime"]=>
7779
bool(false)

0 commit comments

Comments
 (0)