I'll try it tomorrow, but anyway if I use sprintf(debugbuf, "  +
Accelerometer Started\n"); the behaviour is the same. Tomorrow I'll
try to use 255 anyway, just in case.

2009/11/26 Przemek Klosowski <[email protected]>:
> On Thu, Nov 26, 2009 at 3:42 AM, Jordi Soucheiron <[email protected]
>> wrote:
>
>> >    snprintf(debugbuf, 256, "  +  Accelerometer Started\n");
>> > But instead of moving the string to the debugbuf keeps the same
>> > information just as if "  +  Accelerometer Started\n" was a null
>> > string.
>>
>
> Just on a lark---does the behavior change when you use 255 instead of 256 as
> the maximum size in the snprintf() call? If that was the case, perhaps the
> compiler treats that variable (which normally should be of the type size_t)
> as uint8_t, truncating it to zero, which, if true, would explain the
> behavior you see.
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>



-- 
Jordi Soucheiron
Software Engineer

DEXMA
Parc Tecnològic la Salle
Sant Joan de la Salle, 42
08022 Barcelona
t/f: [+34] 93 181 01 95
www.dexmatech.com
[email protected]

Reply via email to