about summary refs log tree commit diff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index e6689d5..dfebbda 100644
--- a/main.c
+++ b/main.c
@@ -216,10 +216,14 @@ int main(void) {
     data.page_type = page_type;
     data.status = status;
     data.script_name = script_name;
-    data.path_info = path_info;
+    if(path_info == NULL) {
+        data.path_info = "";
+    } else {
+        data.path_info = path_info;
+    }
 
     // confirm that we have SCRIPT_NAME and PATH_INFO unless an error occurred
-    assert(data.page_type != PAGE_TYPE_ERROR ||
+    assert(data.page_type == PAGE_TYPE_ERROR ||
            (data.path_info != NULL && data.script_name != NULL));
 
     // make sure that PAGE_TYPE_ENTRY will have an entry set in template_header