url.h
url.h copied to clipboard
url_get_pathname crashing
[ pretend i wrote a useful, very verbose description here ]
foo.c
#include <stdio.h>
#include "url.h"
int main() {
char *url = "https://github.com/jwerle/url.h";
printf("url: '%s'\n", url);
char *repo = url_get_pathname(url);
printf("repo: '%s'\n", repo);
return 0;
}
then:
$ make foo
$ ./foo
url: 'https://github.com/jwerle/url.h'
Abort trap: 6
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
any ideas?
Yeah this whole header file can be reworked.. I started https://github.com/jwerle/liburl which will provide the same api eventually.
It no longer crashes but gives the wrong pathname "/".
It no longer crashes but gives the wrong pathname "/".
lets open an issue?