mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix os.stat code; make fmt.panicf diverging
This commit is contained in:
+1
-1
@@ -165,7 +165,7 @@ assertf :: proc(condition: bool, fmt: string, args: ..any, loc := #caller_locati
|
|||||||
return condition;
|
return condition;
|
||||||
}
|
}
|
||||||
|
|
||||||
panicf :: proc(fmt: string, args: ..any, loc := #caller_location) {
|
panicf :: proc(fmt: string, args: ..any, loc := #caller_location) -> ! {
|
||||||
p := context.assertion_failure_proc;
|
p := context.assertion_failure_proc;
|
||||||
if p == nil {
|
if p == nil {
|
||||||
p = runtime.default_assertion_failure_proc;
|
p = runtime.default_assertion_failure_proc;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ full_path_from_name :: proc(name: string, allocator := context.allocator) -> (pa
|
|||||||
name = ".";
|
name = ".";
|
||||||
}
|
}
|
||||||
p := win32.utf8_to_utf16(name, context.temp_allocator);
|
p := win32.utf8_to_utf16(name, context.temp_allocator);
|
||||||
defer delete(p);
|
|
||||||
buf := make([dynamic]u16, 100, allocator);
|
buf := make([dynamic]u16, 100, allocator);
|
||||||
for {
|
for {
|
||||||
n := win32.GetFullPathNameW(raw_data(p), u32(len(buf)), raw_data(buf), nil);
|
n := win32.GetFullPathNameW(raw_data(p), u32(len(buf)), raw_data(buf), nil);
|
||||||
|
|||||||
Reference in New Issue
Block a user