This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Strange behaviour strstr() function

Hi,

I use RealView MDK-ARM 3.15b. When I call tge strstr function to search a substring in a larger string it always return NULL.
This is my code

  char* ptr;
  char str1[80] ;
  char str2[80];
  strcpy(str1,"This is a large string");
  strcpy(str2,"is");
  ptr  = strstr(str1,str2);

ptr is NULL.

Any idea ??

Kind regards
Luc

Parents
  • See that "Support" menu choice at top of the page?

    That is the route to Keil support. This forum is not. "Terms of Use" (link you can see at left of this post) contains the following text:

    "This forum is not monitored by Keil technical support personnel. Do not expect to receive technical support via this forum."

Reply
  • See that "Support" menu choice at top of the page?

    That is the route to Keil support. This forum is not. "Terms of Use" (link you can see at left of this post) contains the following text:

    "This forum is not monitored by Keil technical support personnel. Do not expect to receive technical support via this forum."

Children
  • Thanks for response.

    I contacted Keil support, but the support for my product has expired...
    However I found out that the problem only occur when I use the microlib.
    Knowing this I googled and did find a patch (RVS31-PA-00002-r3p1-11rel0) that installs a new version of the lib where the problem is solved. Thanks again.

    Kind regards
    Luc