YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
22 stars 8 forks source link

Manual Content: buffer_peek() page incorrectly says it returns 0 when peeking past the buffer bounds, but it returns "undefined" #5917

Open attic-stuff opened 4 months ago

attic-stuff commented 4 months ago

Description

on this swanky panky page of the manual the author writes that buffer_peek() returns 0 if it fails, when it in fact returns undefined if it fails.

Manual Link

https://manual.gamemaker.io/monthly/en/#t=GameMaker_Language%2FGML_Reference%2FBuffers%2Fbuffer_peek.htm

rwkay commented 4 months ago

buffer_peek will return undefined if the offset into the buffer is out of range of the buffer

YYBartT commented 4 months ago

Changed the return value of 0 to undefined on the page, also reworded the short function description and the comparison to buffer_read() a bit.