brson / rust-sdl

SDL bindings for Rust
MIT License
179 stars 52 forks source link

Make all file-handling functions/methods use to_c_str().with_ref(). #102

Closed lifthrasiir closed 10 years ago

lifthrasiir commented 10 years ago

For img::load, as_imm_buf() was used without converting the string to a null-terminated string and it caused errors quite hard to reason (as it caused get_error() to trigger !is_utf8() assertion). For others, there are no functional changes but I updated them anyway for consistency.

AngryLawyer commented 10 years ago

Great stuff. Cheers.