diff options
Diffstat (limited to 'browser-cli.c')
| -rw-r--r-- | browser-cli.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/browser-cli.c b/browser-cli.c index 64d5a73..d3d4c2f 100644 --- a/browser-cli.c +++ b/browser-cli.c @@ -151,13 +151,13 @@ int handleCLI(sds *host, sds *port, sds *uri, const sds page) { char* startPort = strchr(newURI, ':'); // Update host - if (startHost < startPath) { + if (startHost != NULL && startHost < startPath) { if (host != NULL) sdsfree(*host); *host = sdsnewlen(startHost + 1, hostLen(startHost + 1)); } // Update port - if (startPort < startPath) { + if (startPort != NULL && startPort < startPath) { if (port != NULL) sdsfree(*port); *port = sdsnewlen(startPort + 1, portLen(startPort + 1)); } |
