Skip to content

Commit

Permalink
Fix: SFLG/SVCT get incorrect index from named script
Browse files Browse the repository at this point in the history
  • Loading branch information
positively-charged committed Jul 17, 2016
1 parent 0a8835a commit 559b535
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codegen/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void do_svct( struct codegen* codegen ) {
while ( ! list_end( &i ) ) {
struct script* script = list_data( &i );
if ( svct_script( script ) ) {
entry.number = ( short ) t_get_script_number( script );
entry.number = ( short ) script->assigned_number;
entry.size = ( short ) script->size;
c_add_sized( codegen, &entry, sizeof( entry ) );
}
Expand Down Expand Up @@ -165,7 +165,7 @@ void do_sflg( struct codegen* codegen ) {
while ( ! list_end( &i ) ) {
struct script* script = list_data( &i );
if ( script->flags ) {
entry.number = ( short ) t_get_script_number( script );
entry.number = ( short ) script->assigned_number;
entry.flags = ( short ) script->flags;
c_add_sized( codegen, &entry, sizeof( entry ) );
}
Expand Down

0 comments on commit 559b535

Please sign in to comment.