Jump to content
Sign in to follow this  
josef

Boostc 1.6 Alpha - Bug Report

Recommended Posts

I'm thinking that this may be a real bug so I'm posting here as well...

 

Info: BoostC 1.6 ALPHA, IDE 5.7, Target PIC16F84A

 

I'm seeing a memory overwrite with the following code:

 

 

char g_vidRAM[21];

 

void main()

{

// Do some stuff

lcd_print("+------------------+", 1);

// Do some more stuff

}

 

void lcd_print ( const char * pStr, int pLine )

{

vidstrcpy(g_vidRAM,pStr);

// Do even more stuff

}

 

void vidstrcpy (char * pdest, const char *psrc)

{

char i_problem = 0;

while (psrc[i_problem]!=0x00)

{

pdest[i_problem] = psrc[i_problem];

i_problem++;

}

}

 

 

 

What I see is that on initialization of i_problem, the psrc string has its last couple of bytes overwritten.

 

BUT if i_problem is changed to an int data type then things work fine.

 

Thanks!

josef

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...