Skip to content

Commit f8bb078

Browse files
committed
fix: replace POSTJECT_SENTINEL_STRING macro with a const char*
Maybe that will fix this error: ``` Error: Could not find the sentinel POSTJECT_SENTINEL_fce680ab2cc467b6e072b8b5df1996b2: in the binary at inject (dist/api.js:5147:11) at async Context.<anonymous> (file:///home/circleci/project/test/cli.mjs:138:7) ``` Refs: https://app.circleci.com/pipelines/github/postmanlabs/postject/197/workflows/741145b6-e19e-4d09-b995-49eebc237962/jobs/1580 Signed-off-by: Darshan Sen <raisinten@gmail.com>
1 parent 7a08958 commit f8bb078

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

postject-api.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ inline void postject_options_init(struct postject_options* options) {
3535
}
3636

3737
static inline bool postject_has_resource() {
38-
#define POSTJECT_SENTINEL_STRING \
39-
"POSTJECT_SENTINEL_fce680ab2cc467b6e072b8b5df1996b2:0"
40-
return POSTJECT_SENTINEL_STRING[sizeof(POSTJECT_SENTINEL_STRING) - 2] == '1';
41-
#undef POSTJECT_SENTINEL_STRING
38+
const char* sentinel = "POSTJECT_SENTINEL_fce680ab2cc467b6e072b8b5df1996b2:0";
39+
return sentinel[strlen(sentinel) - 1] == '1';
4240
}
4341

4442
static const void* postject_find_resource(

0 commit comments

Comments
 (0)