On Sat, 13 Feb 2010, Szak�ts Viktor wrote: Hi,
> >> HB_SIZE nLen; > >> const char * s = hb_itemGetStr( pParam, hb_setGetOSCP(), &hString, &nLen ); > >> p = hb_strunshare( &hString, s, nLen ); > > Exactly and now 'p' is writable string with 'nLen' characters which > > you can change. > It doesn't seem so. In win_dll.c it will still let the callee > overwrite the item string buffer since: p == hb_itemGetCPtr( pParam )) > At least where cData is initialized using SPACE(), in test_dll.prg. > (maybe the rules is something else, but that was the closest > I can come up with this time). There is bug in hb_[w]strunshare() functions - they do not clone writable buffers shared by two or more different objects or items. I'll fix it in a while. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour