www.digitalmars.com         C & C++   DMDScript  

c++.rtl - RegExp::compile

According to the documentation (http://www.digitalmars.com/rtl/regexp.html)
I am allowed to pass a NULL pointer to the "attributes" parameter of
RegExp::compile, but if I try to do it, I get an access violation:

#include <regexp.h>

int main()
{
  RegExp re;
  re.compile("abc", NULL, 1);

  return 0;
}


Looking at the RTL source code, I guess the problem is in line 140
(src/core/regexp.c) which doesn't check for a NULL pointer:

_tcscpy(flags, attributes);


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw jabber.at
mailto cmeerw at web.de

...and what have you contributed to the Net?
Aug 03 2002