stbi: more clear panic message

pull/6190/head
Alexander Medvednikov 2020-08-22 00:51:12 +02:00
parent fb148e0b61
commit 793d2ce6dc
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ pub fn load(path string) Image {
flag := if ext == 'png' { C.STBI_rgb_alpha } else { 0 }
res.data = C.stbi_load(path.str, &res.width, &res.height, &res.nr_channels, flag)
if isnil(res.data) {
panic('stbi image failed to load')
panic('stbi image failed to load from "$path"')
}
return res
}