MSVC lacks stpcpy()

modified:   p_lx_elf.cpp
This commit is contained in:
John Reiser 2024-08-26 16:43:58 -07:00
parent 8065eebca3
commit 65c362efce
1 changed files with 3 additions and 1 deletions

View File

@ -5919,7 +5919,9 @@ unsigned PackLinuxElf32::forward_Shdrs(OutputFile *fo, Elf32_Ehdr *const eho)
} }
} }
set_te32(&sh_out->sh_name, ptr_shstrings - (char *)mb_shstrings.getVoidPtr()); set_te32(&sh_out->sh_name, ptr_shstrings - (char *)mb_shstrings.getVoidPtr());
ptr_shstrings = 1+ stpcpy(ptr_shstrings, name); // past terminating '\0' do { // stupid MSVC lacks stpcpy()
*ptr_shstrings++ = *name;
} while (*name++);
++sh_out; ++n_sh_out; // actually commit the fowarding ++sh_out; ++n_sh_out; // actually commit the fowarding
} }
} }