1
0
Fork 0

Use the builder's allocator.

This commit is contained in:
namedkitten 2020-07-18 14:32:51 +01:00
parent 77dbb75d9c
commit b3173e161d

View file

@ -31,7 +31,7 @@ pub fn build(b: *Builder) void {
if (weather_location.len == 0) { if (weather_location.len == 0) {
weather_location = "\"\""; weather_location = "\"\"";
} else if (weather_location[0] != '"') { } else if (weather_location[0] != '"') {
weather_location = std.fmt.allocPrint(std.heap.page_allocator, "\"{}\"", .{weather_location}) catch "\"\""; weather_location = std.fmt.allocPrint(b.allocator, "\"{}\"", .{weather_location}) catch "\"\"";
} }
exe.addBuildOption([]const u8, "weather_location", weather_location); exe.addBuildOption([]const u8, "weather_location", weather_location);