diff --git a/src/adbg/debugger/thread.d b/src/adbg/debugger/thread.d index d9f0aa01..f74594ac 100644 --- a/src/adbg/debugger/thread.d +++ b/src/adbg/debugger/thread.d @@ -285,8 +285,8 @@ unittest { char[BUFSZ] buffer = void; int r = adbg_register_format(buffer.ptr, BUFSZ, ®, 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: