diff --git a/luna/include/luna/Format.h b/luna/include/luna/Format.h index 245979a7..e1cccc3c 100644 --- a/luna/include/luna/Format.h +++ b/luna/include/luna/Format.h @@ -6,5 +6,5 @@ typedef Result (*callback_t)(char, void*); Result cstyle_format(const char* format, callback_t callback, void* arg, va_list ap); -Result vstring_format(char* buf, size_t max, const char* format, va_list ap); -Result string_format(char* buf, size_t max, const char* format, ...); \ No newline at end of file +Result vstring_format(char* buf, usize max, const char* format, va_list ap); +Result string_format(char* buf, usize max, const char* format, ...); \ No newline at end of file diff --git a/luna/src/Format.cpp b/luna/src/Format.cpp index 5bb9cb1e..ccdde3ab 100644 --- a/luna/src/Format.cpp +++ b/luna/src/Format.cpp @@ -475,10 +475,10 @@ Result cstyle_format(const char* format, callback_t callback, void* arg, struct StringFormatInfo { char* buffer; - size_t remaining; + usize remaining; }; -Result vstring_format(char* buf, size_t max, const char* format, va_list ap) +Result vstring_format(char* buf, usize max, const char* format, va_list ap) { StringFormatInfo info = {.buffer = buf, .remaining = max - 1}; @@ -499,7 +499,7 @@ Result vstring_format(char* buf, size_t max, const char* format, va_list return result; } -Result string_format(char* buf, size_t max, const char* format, ...) +Result string_format(char* buf, usize max, const char* format, ...) { va_list ap; va_start(ap, format);