Skip to content

Commit

Permalink
fix: uses getsectiondata
Browse files Browse the repository at this point in the history
  • Loading branch information
SHIINASAMA committed Dec 12, 2024
1 parent b8b0626 commit a2f8824
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
-DSESE_USE_ARCHIVE=ON
-DSESE_DB_USE_MARIADB=ON
-DSESE_DB_USE_POSTGRES=ON
-DSESE_RESOURCE=ON
-Bbuild
- name: Always Save Cache
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
-DSESE_BUILD_TEST=ON
-DSESE_USE_ARCHIVE=ON
-DSESE_RESOURCE=ON
-DSESE_DB_USE_MARIADB=ON
-DSESE_DB_USE_POSTGRES=ON
-DSESE_DB_MYSQL_CONNECTION_STRING="host=127.0.0.1\;port=18806\;user=root\;pwd=libsese\;db=db_test\;"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
-DSESE_BUILD_TEST=ON
-DSESE_USE_ARCHIVE=ON
-DSESE_RESOURCE=ON
-Bbuild
- name: Always Save Cache
Expand Down
5 changes: 4 additions & 1 deletion sese/res/BundlerResource.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#pragma once

#include <mach-o/loader.h>
#include <sese/Config.h>
#include "ResourceStream.h"

Expand Down Expand Up @@ -98,7 +99,9 @@ template<class R>
ResourceStream::Ptr BundlerResource<R>::getBinary(BinaryIds id) {
auto name = R::syms[static_cast<int>(id)];
unsigned long size;
auto start = getsectdata("__DATA", name, &size);
struct mach_header_64 header{};
// auto start = getsectdata("__DATA", name, &size);
auto start = getsectiondata(&header, "__DATA", name, &size);
return std::make_unique<ResourceStream>(start, size);
}

Expand Down

0 comments on commit a2f8824

Please sign in to comment.