From c522f6e70b02d161e4bf37023edb20643ee34acf Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 23 Aug 2010 21:32:00 +0000 Subject: [PATCH] Fix thinko. Having no tests is great ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111848 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/ELFObjectWriter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 79b89ba0b6e..3b07a53f06f 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -152,12 +152,12 @@ namespace { void StringLE32(char *buf, uint32_t Value) { StringLE16(buf, uint16_t(Value >> 0)); - StringLE16(buf, uint16_t(Value >> 16)); + StringLE16(buf + 2, uint16_t(Value >> 16)); } void StringLE64(char *buf, uint64_t Value) { StringLE32(buf, uint32_t(Value >> 0)); - StringLE32(buf, uint32_t(Value >> 32)); + StringLE32(buf + 4, uint32_t(Value >> 32)); } void StringBE16(char *buf ,uint16_t Value) { @@ -167,12 +167,12 @@ namespace { void StringBE32(char *buf, uint32_t Value) { StringBE16(buf, uint16_t(Value >> 16)); - StringBE16(buf, uint16_t(Value >> 0)); + StringBE16(buf + 2, uint16_t(Value >> 0)); } void StringBE64(char *buf, uint64_t Value) { StringBE32(buf, uint32_t(Value >> 32)); - StringBE32(buf, uint32_t(Value >> 0)); + StringBE32(buf + 4, uint32_t(Value >> 0)); } void String16(char *buf, uint16_t Value) {