Path: utzoo!mnetor!uunet!husc6!bbn!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!rs4u+ From: rs4u+@andrew.cmu.edu (Richard Siegel) Newsgroups: comp.sys.mac.programmer Subject: GetIndString() and StringPtr Message-ID: Date: 4 Apr 88 11:46:49 GMT Organization: Carnegie Mellon University Lines: 20 The argument to GetIndString isn't a StringPtr per se, rather, it's the *address* of an Str255. If you're passing an unitialized StringPtr to GetIndString, anything can (and will!) happen. So consider: Str255 s; /* other stuff */ GetIndString(&s, foo, bar); If the string couldn't be found, then the string will be of zero-length -- NOT NULL! -- so its first byte will be zero: if (!s[0]) {/* string is of nonzero length*/} Hope this works OK for you... -R.