Skip to content

Commit

Permalink
Merge pull request #3149 from 4144/fixes
Browse files Browse the repository at this point in the history
Different fixes
  • Loading branch information
MishimaHaruna authored Aug 15, 2022
2 parents c7897ff + 58b8df8 commit 3d39c66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/char/pincode.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,11 @@ static void pincode_notifyLoginPinError(int account_id)

static void pincode_decrypt(unsigned int userSeed, char *pin)
{
int i;
char tab[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };

nullpo_retv(pin);

for (i = 1; i < 10; i++) {
unsigned char tab[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };

for (int i = 1; i < 10; i++) {
int pos;
userSeed = pincode->baseSeed + userSeed * pincode->multiplier;
pos = userSeed % (i + 1);
Expand All @@ -318,7 +317,7 @@ static void pincode_decrypt(unsigned int userSeed, char *pin)
}
}

for (i = 0; i < 4; i++) {
for (int i = 0; i < 4; i++) {
if (pin[i] < '0' || pin[i] > '9')
pin[i] = '0';
else
Expand Down
2 changes: 1 addition & 1 deletion src/map/clif.c
Original file line number Diff line number Diff line change
Expand Up @@ -7671,7 +7671,7 @@ static void clif_party_message(struct party_data *p, int account_id, const char
struct PACKET_ZC_NOTIFY_CHAT_PARTY *packet = (struct PACKET_ZC_NOTIFY_CHAT_PARTY *)&buf;

packet->PacketType = HEADER_ZC_NOTIFY_CHAT_PARTY;
packet->PacketLength = len + sizeof(struct PACKET_ZC_NOTIFY_CHAT_PARTY);
packet->PacketLength = len + 1 + sizeof(struct PACKET_ZC_NOTIFY_CHAT_PARTY);
packet->AID = account_id;
safestrncpy(packet->chatMsg, mes, len + 1);

Expand Down

0 comments on commit 3d39c66

Please sign in to comment.