Incorrect lcf-size calculation for non-ascii-strings in event commands #196

Open
Ghabry opened this Issue Feb 22, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@Ghabry
Member

Ghabry commented Feb 22, 2017

just a reminder for me, should be an easy fix.

Same as EasyRPG/Player#1090 , but that code was Player specific to avoid reader_struct include.

To reproduce: Convert a LSD that contains umlauts with lcf2xml and back with xml2lcf. Load in RPG_RT: Stream read error.

Bug is in

void RawStruct<RPG::EventCommand>::WriteLcf(const RPG::EventCommand& event_command, LcfWriter& stream) {

or
int RawStruct<RPG::EventCommand>::LcfSize(const RPG::EventCommand& event_command, LcfWriter& stream) {

@Ghabry Ghabry added this to the 0.5.1 milestone Feb 22, 2017

@Ghabry Ghabry self-assigned this Feb 22, 2017

carstene1ns added a commit that referenced this issue Apr 8, 2017

Merge pull request #198 from Ghabry/development
Fix #194 (heap corruption) and #196 (LcfWriter writing incorrect strings)

@Ghabry Ghabry reopened this Apr 12, 2017

@Ghabry Ghabry modified the milestones: 0.6.0, 0.5.1 Apr 12, 2017

@carstene1ns

This comment has been minimized.

Show comment
Hide comment
@carstene1ns

carstene1ns Apr 13, 2017

Member

I liked the former way better. We were not RPG_RT compatible, but did not crash on our own saves.
Thing is when we wait longer, we will get more and more negative feedback on google play and bug reports and such.
Maybe is better to revert 5abb593 and merge #199 so we have more time to investigate.

Member

carstene1ns commented Apr 13, 2017

I liked the former way better. We were not RPG_RT compatible, but did not crash on our own saves.
Thing is when we wait longer, we will get more and more negative feedback on google play and bug reports and such.
Maybe is better to revert 5abb593 and merge #199 so we have more time to investigate.

@Ghabry

This comment has been minimized.

Show comment
Hide comment
@Ghabry

Ghabry Apr 17, 2017

Member

I agree with your suggestion. I will create some faulty LSDs tomorrow to see if my PR works and then lgtm.

The "stream read error" bug must be somewhere else, just did really sloppy testing with my patch :/

Member

Ghabry commented Apr 17, 2017

I agree with your suggestion. I will create some faulty LSDs tomorrow to see if my PR works and then lgtm.

The "stream read error" bug must be somewhere else, just did really sloppy testing with my patch :/

@carstene1ns carstene1ns modified the milestones: 0.5.2, 0.6.0 May 14, 2017

@Ghabry Ghabry modified the milestones: 0.6.0, 0.5.2 Jun 27, 2017

Ghabry added a commit to Ghabry/easyrpg-liblcf that referenced this issue Aug 25, 2017

Don't emit a 0-byte after writing the RPG::Database chunk. This resul…
…ts in a stream read error in RPG_RT.

Merged this with the RPG::Save part using a type_trait.

Probably related to #196 but not sure if this is the actual bug.

Ghabry added a commit to Ghabry/easyrpg-liblcf that referenced this issue Aug 25, 2017

Don't emit a 0-byte after writing the RPG::Database chunk. This resul…
…ts in a stream read error in RPG_RT.

Merged this with the RPG::Save part using a type_trait.

Probably related to #196 but not sure if this is the actual bug.

@Ghabry Ghabry referenced this issue Aug 25, 2017

Merged

Fix ldb writing #209

Ghabry added a commit to Ghabry/easyrpg-liblcf that referenced this issue Aug 25, 2017

Don't emit a 0-byte after writing the RPG::Database chunk. This resul…
…ts in a stream read error in RPG_RT.

Merged this with the RPG::Save part using a type_trait.

Probably related to #196 but not sure if this is the actual bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment