-
|
Hello, Can you explain your shared Advanced(buffer* Buffer, umw Count) in C? |
Beta Was this translation helpful? Give feedback.
Answered by
bagaffey
Sep 15, 2025
Replies: 1 comment
-
|
Yeah, what it is doing is advancing a buffer by There's two cases:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
btgvesta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, what it is doing is advancing a buffer by
Countnumber of bytes (unsigned machine word).There's two cases:
Countnumber of 8-bit bytes. This effectively slices a segment, that isCountlong, off the start of the buffer.Countis larger than the length of the buffer then the buffer is exhausted i.e. its length is set to 0 after advancing the buffer to its end. The result pointer is kept at 0 (pointing at nothing). This is intentional so that the caller knows that the advance could not return a …