diff --git a/asm/float.c b/asm/float.c index ff3d9c8f..c90fb27c 100644 --- a/asm/float.c +++ b/asm/float.c @@ -556,7 +556,7 @@ static bool ieee_flconvert_bin(const char *string, int bits, mp = &mult[MANT_LIMBS]; /* Guard slot */ ms += LIMB_BITS; } - *mp |= v << ms; + *mp |= v << (ms % (sizeof(fp_limb) * CHAR_BIT)); ms -= bits; if (!seendot) diff --git a/asm/nasm.c b/asm/nasm.c index 9e363140..c7d5e3c6 100644 --- a/asm/nasm.c +++ b/asm/nasm.c @@ -520,9 +520,14 @@ int main(int argc, char **argv) * is a preprocess mode, we're perfectly * fine to output into stdout. */ - if (!outname) { - if (!(operating_mode & OP_PREPROCESS)) - outname = filename_set_extension(inname, ofmt->extension); + if (!outname && !(operating_mode & OP_PREPROCESS)) { + outname = filename_set_extension(inname, ofmt->extension); + if (!strcmp(outname, inname)) { + outname = "nasm.out"; + nasm_error(ERR_WARNING, + "default output file same as input, using `%s' for output\n", + inname, outname); + } } if (depend_file || (operating_mode & OP_DEPEND))