Re: [Plib-devel] Re: [PATCH] ssg/ssgLoadAC.cxx: fix potential crash; accept DOS line endings
Brought to you by:
sjbaker
From: Frederic B. <fr...@wa...> - 2003-07-05 07:36:05
|
Melchior FRANZ writes: > * Frederic Bouvier -- Friday 04 July 2003 23:07: > > This patch produces this on MSVC : > [...] > > ssgLoadAC.cxx(352) : error C2466: cannot allocate an array of constant > [...] > > I propose the patch below. It avoids a strcpy at the expense of two bytes : > > That's what I had before, but I dismissed it because of the wasted > two bytes. I didn't know how much memory this would make in a whole > ssg tree. Apart from that it's of course better (and faster). > If the two bytes are a problem, you can still revert and apply the > patch that I had sent first (-> start of the thread). I think memory allocation is made by chunks of at least 16 bytes, so these two bytes wouldn't make a difference on most allocation. -Fred |