Skip to content

Commit

Permalink
Fix unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed May 23, 2024
1 parent b12ee12 commit 76d5096
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adbg/debugger/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ unittest {
char[BUFSZ] buffer = void;
int r = adbg_register_format(buffer.ptr, BUFSZ, &reg, AdbgRegFormat.hex);
assert(r == 4);
// 16 to check null terminator
assert(strncmp(buffer.ptr, "1234", BUFSZ) == 0);
assert(buffer[r] == 0);
assert(buffer[0..r] == "1234");
}

private:
Expand Down

0 comments on commit 76d5096

Please sign in to comment.