mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
includes/std: Fixed NullString not including null terminator and not checking for string end correctly
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
import std.io;
|
||||
import std.mem;
|
||||
|
||||
/*!
|
||||
Libray to interact with strings.
|
||||
@@ -35,7 +36,8 @@ namespace auto std::string {
|
||||
@tparam DataType The type of the characters.
|
||||
*/
|
||||
struct NullStringBase<DataType> {
|
||||
DataType string[while($[$] != 0x00)];
|
||||
DataType string[while(std::mem::read_unsigned($, sizeof(DataType)) != 0x00)];
|
||||
DataType null_terminator;
|
||||
} [[sealed, format("std::string::impl::format_string"), transform("std::string::impl::format_string")]];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user