]> granicus.if.org Git - php/commitdiff
- The .c file is generated... so updating the .re file and cleaning up WS.
authorDerick Rethans <derick@php.net>
Sat, 9 Sep 2006 12:25:54 +0000 (12:25 +0000)
committerDerick Rethans <derick@php.net>
Sat, 9 Sep 2006 12:25:54 +0000 (12:25 +0000)
ext/date/lib/parse_date.c
ext/date/lib/parse_date.re

index 4f588f35076a1320998aae1f2f9ae7582cc4acfc..42cc0af919d71def67baaa7af2d0fb281fac714d 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.9.12 on Wed Sep  6 09:33:00 2006 */
+/* Generated by re2c 0.9.12 on Sat Sep  9 14:24:12 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) {
index 0bae9943a60096945558db7f5da409348cfea672..3973f708580b11832f44067ff1458ffb7831676b 100644 (file)
@@ -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();