ProjectTako / kparser

Automatically exported from code.google.com/p/kparser
1 stars 3 forks source link

Missing linebreaks in Chat plugin in 1.3.9. #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start parsing
2. /say foo, wait for it to show up in chat tab
3. /say bar, wait for it to show up in chat tab

What is the expected output? What do you see instead?

I expect

[HH:MM:SS AM] Valyana : foo
[HH:MM:SS AM] Valyana : bar

but see

[HH:MM:SS AM] Valyana : foo[HH:MM:SS AM] Valyana : bar

What version of the product are you using? On what operating system?

1.3.9.0, Windows XP

Please provide any additional information below.

For some reason, nullDelimitedChatLines.Split is leaving the trailing null
on the last line if maxLinesToRead is specified.  This seems to be related
in the change from using PtrToStringUni to PtrToStringAnsi; looking back in
the change history I see that kparser used to use PtrToStringAnsi a while
back, and then it passed maxLinesToRead+1.  Making that change fixes this bug.

Patch attached.

Original issue reported on code.google.com by Valya...@gmail.com on 22 Jun 2009 at 2:27

Attachments:

GoogleCodeExporter commented 8 years ago
Rewrite of reading methodology should completely eliminate this problem.  The
suggested patch fix was also made in case the other code gets reverted.

Original comment by Kinemati...@gmail.com on 8 Aug 2009 at 8:39