Skip to content

Commit

Permalink
LWO import: Don't crash on unsupported SUBD forms
Browse files Browse the repository at this point in the history
NOTE: Newer LWO files may contain a sub form of POLS called SUBD.
Unfortunately, I have found no description on how to interpret those
forms. If you happen to know how to interpret those forms, please
post a message in the Programming forum. The LWO importer will now
quit with an error message instead of crashing when encountering
ae SUBD form. (Thanks to Siber.) [bjorng]
  • Loading branch information
bjorng committed Oct 3, 2009
1 parent 628d098 commit 150c046
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins_src/import_export/wpc_lwo.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%%
%% LightWave Object File Format (*.lwo) Import/Export
%%
%% Copyright (c) 2003-2008 Anthony D'Agostino
%% Copyright (c) 2003-2009 Anthony D'Agostino
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Expand Down Expand Up @@ -322,7 +322,10 @@ read_pnts(Data) ->
read_pols(<<"FACE",Rest/binary>>) ->
read_point_idxs(Rest);
read_pols(<<"PTCH",Rest/binary>>) ->
read_point_idxs(Rest).
read_point_idxs(Rest);
read_pols(<<"SUBD",_/binary>>) ->
wings_u:error("LWO files containing \"SUBD\" sub-forms in "
"\"POLS\" not supported.").

read_point_idxs(<<>>) -> [];
read_point_idxs(Data) ->
Expand Down

0 comments on commit 150c046

Please sign in to comment.