Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to fix extractors and core #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

i-am-fyre
Copy link
Contributor

@i-am-fyre i-am-fyre commented Jun 29, 2022

This change is Reviewable

@billy1arm
Copy link
Member

@i-am-fyre @Meltie2013 - I'd appreciate some eyes on this build !!

  • I have an issue yesterday where mmaps-generator crashed whenever I ran it, but due to a new PC / OS setup it could be my pc rather than the newer code.

@billy1arm
Copy link
Member

This is the partner PR to this commit: 1ba32d2

@billy1arm
Copy link
Member

Actually, it could be related to this:
https://app.codacy.com/gh/mangosthree/server/pullRequest?prid=9701603

char* fileName = new char[pathLen];
snprintf(fileName, pathLen, (sWorld.GetDataPath() + "mmaps/%03i.mmap").c_str(), mapId);
snprintf(fileName, pathLen, (sWorld.GetDataPath() + "mmaps/%04i.mmap").c_str(), mapId);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change causes Segmentation Fault because the format is out of bounds

@@ -155,7 +155,7 @@ bool ChatHandler::HandleMmapLocCommand(char* /*args*/)
int32 gx = 32 - player->GetPositionX() / SIZE_OF_GRIDS;
int32 gy = 32 - player->GetPositionY() / SIZE_OF_GRIDS;

PSendSysMessage("%03u%02i%02i.mmtile", player->GetMapId(), gy, gx);
PSendSysMessage("%04u%02i%02i.mmtile", player->GetMapId(), gy, gx);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this chage causes egmentation fault due to the format on this case is out of bounds

Copy link

@seobryn seobryn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes that you propose are only aplicable for Map Generator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants