finalburnneo / FBNeo

FinalBurn Neo - We are Team FBNeo.
http://neo-source.com
Other
884 stars 356 forks source link

burn.cpp: fix incomplete string copy #1595

Closed taoenwen closed 8 months ago

dinkc64 commented 8 months ago

Hi, can you show me what you're doing to replicate the issue? I'm asking because wcscpy() does copy the terminating null, but in cases when it doesn't, it might be a far more serious issue (OOB etc)

best regards,

taoenwen commented 8 months ago

image L"Guardians\0\u96FB\u795E\u9B54\u584A \uFF29\uFF29\0" It will stop after "Guardians".

dinkc64 commented 8 months ago

oh, I see - nevermind then :)

barbudreadmon commented 8 months ago

How come there is a \0 in the middle of this description ?

I've seen quite a few of them too in the non-unicode descriptions, and replaced them since they simply didn't seem to work in the contexts where BurnDrvGetTextA(DRV_FULLNAME) is called (like dat generation).

dinkc64 commented 8 months ago

barbudreadmon, it puts a little "dot" between the ascii name and non-ascii name, see: (feature?)

gamelist

dinkc64 commented 8 months ago

@taoenwen, did you notice all the stray CR (\r or 0x0d) in the code?

stray_cr

taoenwen commented 8 months ago

@dinkc64 I can't see the difference between them in the VS editor, so it looks like I should use LF to solve them

taoenwen commented 8 months ago

I'll fix them right away.

taoenwen commented 8 months ago

https://github.com/finalburnneo/FBNeo/pull/1596

@dinkc64 It's okay.