Fix null assert check in codemeta
Some checks are pending
build / linux-wasi (push) Waiting to run
build / linux-wasi-api (push) Waiting to run
build / linux-csnext (push) Waiting to run
build / tarball (push) Waiting to run
build / linux-static (push) Waiting to run
build / linux-acr-rpm-64 (push) Waiting to run
build / linux-acr-deb (amd64) (push) Waiting to run
build / linux-acr-deb (arm64, aarch64-linux-gnu) (push) Waiting to run
build / linux-acr-deb (i386, multilib) (push) Waiting to run
build / macos-acr (arm64, 13) (push) Waiting to run
build / macos-acr (x86_64, 12) (push) Waiting to run
build / ios (cydia32) (push) Waiting to run
build / ios (true, cydia) (push) Waiting to run
build / android-acr (16, arm) (push) Waiting to run
build / android-acr (aarch64) (push) Waiting to run
build / android-meson (x86_64) (push) Waiting to run
build / w32-meson (push) Waiting to run
build / w64-static-2022 (push) Waiting to run
build / w64-static (push) Waiting to run
build / w64-meson (push) Waiting to run
build / check_abi_compatibility (push) Blocked by required conditions
build / check_release (push) Blocked by required conditions
build / release (push) Blocked by required conditions
CI / linux-acr-oldlibsbug (push) Waiting to run
CI / linux-nocs (push) Waiting to run
CI / linux-acr-gperf (push) Waiting to run
CI / linux-sys-capstone (push) Waiting to run
CI / linux-acr-resymlink (push) Waiting to run
CI / linux-test (push) Waiting to run
CI / linux-static-meson (push) Waiting to run
CI / macos-test (push) Waiting to run
CI / linux-rpath (push) Waiting to run
CI / macos-rpath (push) Waiting to run
CI / linux-meson-spaces (push) Waiting to run
CI / linux-tinyasan-fuzz (push) Waiting to run
CI / linux-asan-fuzz (push) Waiting to run
CI / w64-make (push) Waiting to run
CI / w32-mingw (push) Waiting to run
CI / w64-mingw (push) Waiting to run
Code scanning - action / CodeQL-Build (push) Waiting to run
Coverity Scan / latest (push) Waiting to run
tcc / ubuntu-tcc-newabi (push) Waiting to run
tcc / ubuntu-tcc-test (push) Waiting to run
tcc / ubuntu-tcc-nodbg (push) Waiting to run
tcc / r2pm-tcc (push) Waiting to run
tcc / ubuntu-tcc-syslibs (push) Waiting to run

This commit is contained in:
pancake 2024-11-08 11:15:20 +01:00
parent c72b9514ad
commit bc3b2b8c9b
2 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* radare2 - LGPL - Copyright 2020-2023 - nimmumanoj, pancake */
/* radare2 - LGPL - Copyright 2020-2024 - nimmumanoj, pancake */
#include <r_core.h>
#include <r_codemeta.h>
@ -42,7 +42,9 @@ R_API RCodeMeta *r_codemeta_clone(RCodeMeta *code) {
}
R_API RCodeMeta *r_codemeta_new(const char *code) {
#if R2_600
R_RETURN_VAL_IF_FAIL (code, NULL);
#endif
RCodeMeta *r = R_NEW0 (RCodeMeta);
if (r) {
r->tree = r_crbtree_new (NULL);

View File

@ -8,6 +8,17 @@ EXPECT=<<EOF
EOF
RUN
NAME=interpret dollar file
FILE=-
CMDS=<<EOF
?e ?e hello > $cmd
. $cmd
EOF
EXPECT=<<EOF
hello
EOF
RUN
NAME=.?e ?e
FILE=--
CMDS=<<EOF