Content originally posted in LPCWare by CodeRedSupport on Thu Sep 16 05:32:05 MST 2010
I presume you are linking against redlib? And at what optimisation level? And what target MCU?
Anyway, I've just run a few simple tests on strstr() and can't see anything obviously wrong with it. If you pause your code after it has hung, where actually are you? And are the values pointed to by buffer/dev actually sensible ?
Your code does seem a little strange though - I presume that an interrupt handler/another task is updating buffer / dev ? If that is the case, it might be worth disabling interrupts around the call to strstr() to see if that changes the behaviour that you see.
Regards,
CodeRedSupport.