Re: [Plib-devel] [PATCH] ssg/ssgLoadAC.cxx: fix potential crash; accept DOS line endings
Brought to you by:
sjbaker
From: Bernie B. <bb...@bi...> - 2003-07-03 09:04:56
|
On Wed, 02 Jul 2003 22:36:06 -0500 Steve Baker <sjb...@ai...> wrote: > Melchior FRANZ wrote: > > 1. add a missing list stopper to avoid potential crashes > > > > 2. most of ssgLoadAC.cxx is able to deal with AC files with > > DOS line endings, only one line breaks it and leads to > > "ac_to_gl: Unrecognised token ''". > > do_data():360 discards the expected '\n', which may > > actually be a '\r' with the real '\n' coming next and > > screwing things up. > > '.ac' files don't have DOS line endings - even the ones written > by the Windoze version of AC3D. > > However, the patch isn't unreasonable - go for it. Instead of the specific patch to do_data() what if skip_space() actually skipped all whitespace characters instead of just ' ' and '\t': while (isspace(**s)) (*s)++; I'm not familiar with the ac format and I haven't tested this but it seems a better fix to a more general problem. Bernie |