aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-24 11:42:49 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-24 11:42:49 +0100
commitbba088bee70a220c6ff99fc7fe68245e1ad6f932 (patch)
treef8ab160a1f7169127d49754dce78c1ba283f78cb /src/parser.cpp
parent6cbb6bef0b817ba24ccbbf68d6192567bdc246ad (diff)
Use UTF-8 command line on windows
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 78a17257a..a023bccd5 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -4664,8 +4664,10 @@ void parse_file(Parser *p, AstFile *f) {
-ParseFileError parse_files(Parser *p, char *init_filename) {
- char *fullpath_str = gb_path_get_full_name(heap_allocator(), init_filename);
+ParseFileError parse_files(Parser *p, String init_filename) {
+ GB_ASSERT(init_filename.text[init_filename.len] == 0);
+
+ char *fullpath_str = gb_path_get_full_name(heap_allocator(), cast(char *)&init_filename[0]);
String init_fullpath = make_string_c(fullpath_str);
TokenPos init_pos = {};
ImportedFile init_imported_file = {init_fullpath, init_fullpath, init_pos};