Jump to content
Eternal Lands Official Forums
Puntif

Accuracy/Magic Indicator Stone console report truncated

Recommended Posts

The accuracy/magic indicator stone GUI window seems OK but when I use the context menu to send the data to the chat log sometimes the data is truncated. Here is a partial grep from my chat log:

Acc: 3, Magic: 5
Acc: 0, Magic: -3
Acc: 0, Magic: -3
Acc: -1, Magic: -
Acc: -2, Magic: -
Acc: -2, Magic: -
Acc: -4, Magic: -
Acc: -4, Magic: -
Acc: -4, Magic: -
Acc: -1, Magic: 3
Acc: -1, Magic: 3
Acc: -1, Magic: 4
Acc: 0, Magic: 4
Acc: 0, Magic: 6
Acc: 0, Magic: -5
Acc: 0, Magic: -5
Acc: -4, Magic: -
Acc: -3, Magic: 4

 

Looking at astrology.c in CVS I see:

		adjust_astrology_window();
	capping_already_reported = 0;
	if (last_astro_message_len < strlen(raw_text))
	{
			last_astro_message_len = strlen(raw_text) + 1;
			if ((last_astro_message = (char *)realloc(last_astro_message, last_astro_message_len)) == NULL)
					last_astro_message_len = 0;
	}
	safe_strncpy(last_astro_message, raw_text, last_astro_message_len);
}

void free_astro_buffer()

 

I'm not set up to compile right now but I'm thinking that "if" statement should read:

		if (last_astro_message_len <= strlen(raw_text))

instead.

Share this post


Link to post
Share on other sites
...I'm not set up to compile right now but I'm thinking that "if" statement should read:

		if (last_astro_message_len <= strlen(raw_text))

instead.

Thanks Puntif, I agree that's how it should be. I've commited your fix to CVS. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×