Fix mac action

This commit is contained in:
Krzosa Karol
2024-01-08 06:48:18 +01:00
parent 6dbef92794
commit 7c7c596227
3 changed files with 3 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ jobs:
- run: sudo apt install g++ - run: sudo apt install g++
- run: g++ code/build_main.cpp -o bld && ./bld - run: g++ code/build_main.cpp -o bld && ./bld
run-and-compile-mac: run-and-compile-mac:
runs-on: mac-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: brew install llvm - run: brew install llvm

View File

@@ -5,5 +5,5 @@ mkdir build
cd build cd build
cl -Fe:bld.exe ../code/build_main.cpp -WX -W3 -wd4200 -diagnostics:column -nologo -Zi -D_CRT_SECURE_NO_WARNINGS /MD cl -Fe:bld.exe ../code/build_main.cpp -WX -W3 -wd4200 -diagnostics:column -nologo -Zi -D_CRT_SECURE_NO_WARNINGS /MD
cd .. cd ..
build\bld.exe asd=Memes build\bld.exe

View File

@@ -123,6 +123,7 @@ struct Table {
} }
Entry *get_table_entry(uint64_t key) { Entry *get_table_entry(uint64_t key) {
if (len == 0) return 0;
uint64_t hash = TABLE_HASH_BYTES(&key, sizeof(key)); uint64_t hash = TABLE_HASH_BYTES(&key, sizeof(key));
if (hash == 0) hash += 1; if (hash == 0) hash += 1;
uint64_t index = TABLE__WRAP_AROUND_POWER_OF_2(hash, cap); uint64_t index = TABLE__WRAP_AROUND_POWER_OF_2(hash, cap);