Skip to content

Commit

Permalink
Fix typo on INFINITY (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio authored Feb 24, 2024
1 parent ae4b7b8 commit 0f966e3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
7 changes: 4 additions & 3 deletions .ci-scripts/ci-build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ wget -O "rizin.tar.xz" "https://github.com/rizinorg/rizin/releases/download/$CI_
tar xf "rizin.tar.xz"
cd "rizin-$CI_RZ_VERSION"

meson --buildtype=release -Denable_tests=false build
meson setup --buildtype=release -Denable_tests=false build
sudo ninja -C build install

# cleanup
Expand All @@ -28,8 +28,8 @@ rm -rf "rizin-*"
cd "$CI_JSDEC"

# build jsdec and install in the rizin dir.
meson --buildtype=release -Dstandalone=false build
sudo ninja -v -C build install
meson setup --buildtype=release -Dstandalone=false build
sudo ninja -C build install

# check if it was installed correctly and try to run it.
HAS_JSDEC=$(rizin -Qc "Lc" | grep jsdec)
Expand All @@ -43,5 +43,6 @@ OUTPUT=$(rizin -Qc 'af ; pdd' /bin/ls)
CHECK=$(echo -e "$OUTPUT" | grep "jsdec pseudo code output")
echo -e "$OUTPUT"
if [ -z "$CHECK" ]; then
echo "rizin failed to exec jsdec."
exit 1
fi
6 changes: 3 additions & 3 deletions .github/workflows/build-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout commit
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt -y install meson ninja-build
- name: Build & run the plugin
Expand All @@ -33,8 +33,8 @@ jobs:
- "windows-static"
- "windows-shared64"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9.x
- name: Preparing msvc toolchain
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
8 changes: 4 additions & 4 deletions .github/workflows/continuous-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
name: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "16"
- name: eslint
Expand All @@ -22,15 +22,15 @@ jobs:
name: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: tests
run: chmod +x .ci-scripts/ci-tests.sh && .ci-scripts/ci-tests.sh "${{ github.ref_name }}"

licenses:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Reuse Compliance Check
uses: fsfe/reuse-action@v2
with:
Expand Down
9 changes: 2 additions & 7 deletions c/jsdec-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,15 @@ static JSValue js_analysis_bytes(JSContext *ctx, RzCore *core, RzAnalysisBytes *

static JSValue js_analysis_opcodes(JSContext *ctx, RzCore *core) {
RzAnalysisBytes *ab;
void **it;
JSValue ops = JS_NewArray(ctx);
st64 op_idx = 0;

RzIterator *iter = rz_core_analysis_bytes(core, core->offset, core->block, core->blocksize, 0);
if (!iter) {
return ops;
}
rz_iterator_foreach (iter, it) {
if (!it || !*it) {
continue;
}
ab = *it;
if (!ab->op || !strcmp(ab->opcode, "nop")) {
rz_iterator_foreach (iter, ab) {
if (!ab || !ab->op || !strcmp(ab->opcode, "nop")) {
continue;
}
JSValue op = js_analysis_bytes(ctx, core, ab);
Expand Down
2 changes: 1 addition & 1 deletion subprojects/packagefiles/libquickjs/quickjs.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ typedef struct JSRefCountHeader {
} JSRefCountHeader;


#ifndef INFINITE
#ifndef INFINITY
#include <float.h>
#define INFINITY (DBL_MAX + DBL_MAX)
#endif
Expand Down

0 comments on commit 0f966e3

Please sign in to comment.