Skip to content

Commit

Permalink
fix crash caused by gh runner
Browse files Browse the repository at this point in the history
  • Loading branch information
shevernitskiy committed Jan 23, 2025
1 parent b07c17f commit 26c1571
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ use crate::dictionary::DICTIONARY;
#[no_mangle]
extern "C" fn attach() {
std::env::set_var("RUST_BACKTRACE", "1");
if std::fs::exists(&CONFIG.settings.log_file).unwrap() {
std::fs::remove_file(&CONFIG.settings.log_file).expect("unable to remove log file");
}
simple_logging::log_to_file(&CONFIG.settings.log_file, utils::log_level(CONFIG.settings.log_level)).unwrap();
if CONFIG.metadata.name != "dfint localization hook" {
error!("unable to find config file");
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub enum MessageIconType {
Info = 0x40,
}

#[allow(temporary_cstring_as_ptr)]
#[allow(dangling_pointers_from_temporaries)]
pub fn message_box(title: &str, text: &str, icon: MessageIconType) {
let ret = SDL_MESSAGE_BOX(
icon as u32,
Expand Down

0 comments on commit 26c1571

Please sign in to comment.