mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-29 19:22:38 +00:00
Add SKIPSTRINGN macro
This commit is contained in:
parent
bc62dc8214
commit
de4eed6af2
1 changed files with 2 additions and 1 deletions
|
|
@ -143,7 +143,8 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr)
|
|||
#define WRITESTRING(p,s) do { size_t tmp_i = 0; for (; s[tmp_i] != '\0'; tmp_i++) WRITECHAR(p, s[tmp_i]); WRITECHAR(p, '\0');} while (0)
|
||||
#define WRITEMEM(p,s,n) do { memcpy(p, s, n); p += n; } while (0)
|
||||
|
||||
#define SKIPSTRING(p) while (READCHAR(p) != '\0')
|
||||
#define SKIPSTRING(p) while (READCHAR(p) != '\0')
|
||||
#define SKIPSTRINGN(p,n) ({ size_t tmp_i = 0; for (; tmp_i < n && READCHAR(p) != '\0'; tmp_i++); })
|
||||
|
||||
#define READSTRINGN(p,s,n) do { size_t tmp_i = 0; for (; tmp_i < n && (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';} while (0)
|
||||
#define READSTRING(p,s) do { size_t tmp_i = 0; for (; (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';} while (0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue