I have problems using strcat. The following little script does not work and I have no clue why… Maybe it is obvious, but apparently I am blind at this moment…
{
gROOT->Reset();
Char_t *a = “bla”;
Char_t b[32] = “blo”;
strcat(b,a); // I expect blobla as output
}
I get an error message that the memory can’t be read and my root session is ended.
These are not the first lines of C code I am producing and I have used this quite often, but never in Root. Moreover, if I run this from Microsoft Visual C, it works fine… The output is “blablo” as expected. Therefore my question.
I finally reproduced the problem when using an optimized build.
It seems that it is due to a bug in the MSVC7 optimizer, a work-around will be uploaded to the CVS repository very shortly.