Author |
Message
Pages: 1
|
Molotov Member (send private message) Posts: 49 Topics: 21 Location: Behind Keyboard | [947] possible bug with strCopyLen - posted: 2011-12-02 18:37:36 when is was printing the information copied i keept getting some jibberish, like it was reading past the mem used for that string. so i made this to test and as i suspected, seems like strcopylen doesn´t add 0 at the end of the buffer Code:
prints Code:
"Lerning new things is what life is all about, if you are always doing the same old things day in and day out you might aswell just kill yourself." - ME d^_^b |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [948] - posted: 2011-12-02 18:58:10 Code:
this will output curvar = name; Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [949] - posted: 2011-12-02 19:00:58 just to note that 'const strings' have an auto null byte, so if you want to append that too you need to add the extra 1 char size. a sample scenario: var1 = 'testing'; Code:
var1 will now equal "posting" but.... Code:
var1 will equal "post" hope this helps. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Molotov Member (send private message) Posts: 49 Topics: 21 Location: Behind Keyboard | [950] - posted: 2011-12-02 19:02:18 ah thanks.. =) "Lerning new things is what life is all about, if you are always doing the same old things day in and day out you might aswell just kill yourself." - ME d^_^b |
Currently Active Users: There are currently 18 user(s) online. 0 member(s) and 18 guest(s) Most users ever online was 1046, January 28, 2022, 2:08 pm. Statistics: Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51 Welcome to our newest member, yecate |