| ... | @@ -1004,10 +1004,10 @@ int os_self_exe_path(Buf *out_path) { | ... | @@ -1004,10 +1004,10 @@ int os_self_exe_path(Buf *out_path) { |
| 1004 | // Resolve the real path from that. | 1004 | // Resolve the real path from that. |
| 1005 | buf_resize(out_path, PATH_MAX); | 1005 | buf_resize(out_path, PATH_MAX); |
| 1006 | char *real_path = realpath(buf_ptr(tmp), buf_ptr(out_path)); | 1006 | char *real_path = realpath(buf_ptr(tmp), buf_ptr(out_path)); |
| 1007 | assert(real_path == buf_ptr(out_path)); | 1007 | if (!real_path) { |
| 1008 | | 1008 | buf_init_from_buf(out_path, tmp); |
| 1009 | // Deallocate our scratch space. | 1009 | return 0; |
| 1010 | buf_deinit(tmp); | 1010 | } |
| 1011 | | 1011 | |
| 1012 | // Resize out_path for the correct length. | 1012 | // Resize out_path for the correct length. |
| 1013 | buf_resize(out_path, strlen(buf_ptr(out_path))); | 1013 | buf_resize(out_path, strlen(buf_ptr(out_path))); |