diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea2560a..1558cbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,23 +21,23 @@ jobs: draft: true prerelease: true body: "# Changes" - windows: - needs: draft - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v1 - - name: build - run: cargo build -r - - name: upload - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.draft.outputs.upload }} - asset_path: target/release/stove.exe - asset_name: stove.exe - asset_content_type: application/x-msdownload + # windows: + # needs: draft + # runs-on: windows-latest + # steps: + # - uses: actions/checkout@v3 + # - uses: Swatinem/rust-cache@v1 + # - name: build + # run: cargo build -r + # - name: upload + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ needs.draft.outputs.upload }} + # asset_path: target/release/stove.exe + # asset_name: stove.exe + # asset_content_type: application/x-msdownload macos: needs: draft diff --git a/Cargo.toml b/Cargo.toml index b6462cf..1e645d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,14 +9,14 @@ edition = "2021" [dependencies] unreal_asset = { git = "https://github.com/astrotechies/unrealmodding", rev = "40bc421" } -repak = { git = "https://github.com/bananaturtlesandwich/repak", rev = "87f8190", features = ["oodle"] } +repak = { git = "https://github.com/bananaturtlesandwich/repak", rev = "87f8190" } aes = "0.8" glam = { version = "0.23", features = ["fast-math", "bytemuck"] } winit = "0.28" egui = { version = "0.22", features = ["persistence", "serde"] } egui-winit = "0.22" egui-wgpu = "0.22" -pollster = { version = "0.3", features = ["macro"]} +pollster = { version = "0.3", features = ["macro"] } egui-notify = "0.7" egui_file = "0.10" bytemuck = "1.13" diff --git a/src/actor.rs b/src/actor.rs index 74843ed..934112d 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -55,10 +55,15 @@ impl Actor { let name = match asset.get_engine_version() >= unreal_asset::engine_version::EngineVersion::VER_UE5_1 { - true => { - let len = i32::from_le_bytes(norm.extras[8..12].try_into().unwrap()) as usize; - String::from_utf8(norm.extras[12..12 + len].to_vec()).unwrap() - } + true => match norm.extras[8..12] + .try_into() + .ok() + .map(|i| i32::from_le_bytes(i) as usize) + .and_then(|len| String::from_utf8(norm.extras[12..12 + len].to_vec()).ok()) + { + Some(name) => name, + None => norm.base_export.object_name.get_owned_content(), + }, false => norm.base_export.object_name.get_owned_content(), }; let class = asset