Browse Source

cresstr: fix length specified for resource strings to typed const builder

Copy/paste error
Jonas Maebe 3 years ago
parent
commit
27a1acdc7d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/cresstr.pas

+ 1 - 1
compiler/cresstr.pas

@@ -176,7 +176,7 @@ uses
                    end;
             }
             tcb.maybe_begin_aggregate(resstrdef);
-            tcb.emit_string_offset(namelab,length(current_module.localsymtable.name^),st_ansistring,false,charpointertype);
+            tcb.emit_string_offset(namelab,length(R.name),st_ansistring,false,charpointertype);
             tcb.emit_string_offset(valuelab,R.Len,st_ansistring,false,charpointertype);
             tcb.emit_string_offset(valuelab,R.Len,st_ansistring,false,charpointertype);
             tcb.emit_ord_const(R.hash,u32inttype);