diff --git a/output/legacy.c b/output/legacy.c index 15d22e9e..f75291f5 100644 --- a/output/legacy.c +++ b/output/legacy.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 2016-2022 The NASM Authors - All Rights Reserved + * Copyright 2016-2023 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -89,8 +89,11 @@ void nasm_do_legacy_output(const struct out_data *data) case OUT_SEGMENT: type = OUT_ADDRESS; - tsegment |= 1; - /* fall through */ + if (tsegment != NO_SEG && tsegment < SEG_ABS) + tsegment |= 1; + dptr = zero_buffer; + size = data->size; + break; case OUT_ADDRESS: dptr = &data->toffset;