And you don't even have to wait for long.  Look at the last line of
dom\NodeImpl.cpp, setPrefix():

name = name +chColon + localName;

chColon is an XMLCh constant with a value of 0x3A.  But instead of
appending this character, the code is going to append an empty string with
a reserved size of 0x3A.


-Rob


Julian Pardoe wrote:

>In my experience (mostly with RogueWave) a string constructor that takes
an
>int and uses it as a reservation size is a bug waiting to happen.  It's
not
>just that it's confusing: there are just too many ways of ending up with
an
>int by mistake, so even a programmer who's aware of the trap can fall into
>it.



Reply via email to