Browse Source

need to use memchr instead of strchr

David Rose 22 years ago
parent
commit
d353a08dd1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pandatool/src/softegg/softNodeTree.cxx

+ 2 - 2
pandatool/src/softegg/softNodeTree.cxx

@@ -122,12 +122,12 @@ GetModelNoteInfo( SAA_Scene *scene, SAA_Elem *model ) {
                             &bigEndian, (void *)modelNote );
                             &bigEndian, (void *)modelNote );
     
     
     //strip off newline, if present
     //strip off newline, if present
-    char *eol = strchr( modelNote, '\n' );
+    char *eol = (char *)memchr( modelNote, '\n', size );
     if ( eol != NULL)
     if ( eol != NULL)
       *eol = '\0';
       *eol = '\0';
     else
     else
       modelNote[size] = '\0';
       modelNote[size] = '\0';
-    
+
     softegg_cat.spam() << "\nmodelNote = " << modelNote << endl;
     softegg_cat.spam() << "\nmodelNote = " << modelNote << endl;
   }
   }