diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index 0202e069905..ddabf59f309 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -96,13 +96,13 @@ public: ELFEntityIterator &operator+(difference_type n) { assert(Current && "Attempted to increment an invalid iterator!"); - Current += n; + Current += (n * EntitySize); return *this; } ELFEntityIterator &operator-(difference_type n) { assert(Current && "Attempted to subtract an invalid iterator!"); - Current -= n; + Current -= (n * EntitySize); return *this; }