mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 04:30:43 +00:00
relocate the strings in an initialized array/struct
This commit is contained in:
parent
8d6c491390
commit
e72b25144e
1 changed files with 3 additions and 1 deletions
|
@ -49,12 +49,14 @@ static const char rcsid[] =
|
|||
#include "qfcc.h"
|
||||
#include "class.h"
|
||||
#include "def.h"
|
||||
#include "emit.h"
|
||||
#include "expr.h"
|
||||
#include "function.h"
|
||||
#include "idstuff.h"
|
||||
#include "immediate.h"
|
||||
#include "method.h"
|
||||
#include "options.h"
|
||||
#include "reloc.h"
|
||||
#include "strpool.h"
|
||||
#include "struct.h"
|
||||
#include "type.h"
|
||||
|
@ -2080,7 +2082,7 @@ init_elements (def_t *def, expr_t *eles)
|
|||
g += type_size (def->type->aux_type);
|
||||
} else {
|
||||
if (e->type == ex_string) {
|
||||
g->string_var = ReuseString (e->e.string_val);
|
||||
EMIT_STRING (g->string_var, e->e.string_val);
|
||||
} else {
|
||||
memcpy (g, &e->e, type_size (get_type (e)) * 4);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue