mirror of
https://github.com/tnodir/fort
synced 2024-11-15 01:47:47 +00:00
Log: Align path size.
This commit is contained in:
parent
1d8d596a99
commit
05b1d7852c
@ -2,9 +2,11 @@
|
||||
|
||||
#define WIPF_BUFFER_SIZE 16 * 1024
|
||||
#define WIPF_LOG_PATH_MAX 512
|
||||
#define WIPF_LOG_ALIGN 4
|
||||
|
||||
#define WIPF_LOG_SIZE(path_len) \
|
||||
(sizeof(UINT32) + sizeof(UINT32) + sizeof(UINT32) + (path_len))
|
||||
((sizeof(UINT32) + sizeof(UINT32) + sizeof(UINT32) + (path_len)) \
|
||||
+ (WIPF_LOG_ALIGN-1)) & ~(WIPF_LOG_ALIGN-1)
|
||||
|
||||
|
||||
static void
|
||||
|
@ -9,7 +9,7 @@ local mem, win32 = sys.mem, sys.win32
|
||||
print"-- Log Write"
|
||||
do
|
||||
local path = "/test"
|
||||
local outlen = 12 + #path
|
||||
local outlen = 12 + #path + 3
|
||||
local bufsize = outlen + 4
|
||||
local buf = assert(mem.pointer(bufsize))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user