summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2006-09-09 12:26:33 +0000
committerDerick Rethans <derick@php.net>2006-09-09 12:26:33 +0000
commit0c8042dc49295cc905c3202afa5aac63b22a7a56 (patch)
treedc751feaa628c131fe153549cc2cb858e89a8d71
parentd577b8058c7b22097cb87e6887595599c2f4bbf0 (diff)
downloadphp-git-0c8042dc49295cc905c3202afa5aac63b22a7a56.tar.gz
- MFH: The .c file is generated... so updating the .re file and cleaning up WS.
-rw-r--r--ext/date/lib/parse_date.c6
-rw-r--r--ext/date/lib/parse_date.re12
2 files changed, 10 insertions, 8 deletions
diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
index dececa88c6..8b5820e022 100644
--- a/ext/date/lib/parse_date.c
+++ b/ext/date/lib/parse_date.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.9.12 on Wed Sep 6 09:33:34 2006 */
+/* Generated by re2c 0.9.12 on Sat Sep 9 14:19:46 2006 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@@ -22147,8 +22147,8 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
while (isspace(*e) && e > s) {
e--;
}
- }
- if (e - s < 1){
+ }
+ if (e - s < 1) {
in.time = timelib_time_ctor();
add_error(&in, "Empty string");
if (errors) {
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index 0bae9943a6..3973f70858 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -1522,11 +1522,13 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
in.errors->error_count = 0;
in.errors->error_messages = NULL;
- while (isspace(*s) && s < e) {
- s++;
- }
- while (isspace(*e) && e > s) {
- e--;
+ if (len > 0) {
+ while (isspace(*s) && s < e) {
+ s++;
+ }
+ while (isspace(*e) && e > s) {
+ e--;
+ }
}
if (e - s < 1) {
in.time = timelib_time_ctor();