Advertisement
    Beating Emerald Weapon the fastest in 07
    The Death Penalty glitch in action Beating Emerald Weapon the fastest in 07

    An overflow glitch is a type of glitch that has appeared in various games throughout the series. It often manifests as a glitch that rolls damage over from the maximum damage to either low damage, or instantly killing an enemy, when the player hits a certain amount of kills, Ability Points, or any other special requirements.

    Appearances

    Final Fantasy III

    In the Famicom version, it is possible for the game to try to increase a character's maximum HP by more than 255 on level up at levels 70+ and on high Stamina jobs. If this happens, a character's HP may only increase by single digits, depending on the random variance to the HP gain. A player can avoid this by either resetting and redoing the level up to try to roll lower, or by switching to a lower Stamina job.

    The 3D remake and Pixel Remaster use a different HP gain formula for level ups so an overflow is no longer possible in those versions.

    Final Fantasy IV

    In the SNES and PlayStation versions, when Cure4 heals more than 16,383 (2^14 - 1) damage on an enemy, the spell will heal the MP of that target instead.

    When the party meets the Magus Sisters, if the player keeps defeating Mindy and Sandy, letting Cindy revive them over and over again, they will continue to give EXP. After 256 enemies have fallen, this number will loop back to 0. For example, if the party accumulates EXP from 258 kills in a battle, they will receive 2 EXP.

    Final Fantasy V

    The maximum amount of damage a character can do in a single move is 65,535: (2^16 - 1), though it will be capped to 9999. If a character were to do more damage than that, the overflow will cause the counter to start over from zero again. For example, if a character dealt 70,000 damage in one hit, the system will count up to 65,535 and roll over to zero, ending up doing 4,464 damage. The easiest way to trigger the glitch is by performing a Sword Dance after having maxed both Strength, Speed and Level via Sing while wielding either the Chicken Knife or a weapon with more than 105 attack wielded with Two-Handed.

    Final Fantasy VI

    Final Fantasy 6 Glitches and Tricks
    Final Fantasy 6 Glitches and Tricks

    The maximum amount of damage a character can do in a single move is 65,535: (2^16 - 1), though it will be capped to 9999. If a character were to do more damage than that, the overflow will cause the counter start over from zero again. For example, if a character dealt 70,000 damage in one hit, the system will count up to 65,535 and roll over to zero, ending up doing 4,464 damage. The easiest way to trigger the glitch is through casting Ultima with a character who has over 140 Magic. There is a bugfix patch that players can use to fix it on the SNES version.

    This glitch was fixed in the Advance version.

    Final Fantasy VII

    FFVII - Gameshark Goodies - EXP, Gil and Battles Overflow
    The glitch in action FFVII - Gameshark Goodies - EXP, Gil and Battles Overflow

    All the integer numbers are encoded in 32 bits. Since they need to be signed integers, the two's complement representation is used. In this encoding the leftmost bit is negative weighted, while all the others have a positive value. Given 2^n, the sum of all the powers of 2 with the exponent in the range (0, n - 1) is equal to (2^n) - 1. This means the lower and upper bounds for in-game integers are

    2 31 = 2 , 147 , 483 , 648 {\displaystyle -2^{31} = -2,147,483,648}

    and

    2 31 1 = 2 , 147 , 483 , 647 {\displaystyle 2^{31} - 1 = 2,147,483,647}

    If, at any point, the computation of some value results in a number which is out of those bounds, an overflow occurs and the game exhibits abnormal behaviors when this happens.

    Final Fantasy VII has several instances of integer overflows. The most important and known one is the damage overflow glitch.

    Damage overflow

    Other instances

    Other overflow-related bugs involve rolling over AP (only on the Underwater Materia), Experience Points for characters, battle and escape counters, the gil counter, the timer, and the chance to cover with the Cover Materia. The maximum amount of battles and escapes the counter will hold is 65,535, and once the player exceeds it, it will reset to 0. The chocobo breeding sidequest and Chocobo Sage's advice are affected by the number of fought battles, and thus behave strangely at very high numbers of battles fought because the game suffers from a two-fold glitch from storing the number of fought battles as a signed 16-bit value. This means the number could be between -32768 to 32767. Thus, if a player who has fought 32767 battles fights one more, the number is saved as -32768 because of integer overflow.

    The timer will reset to 0 after roughly 136 years, 36 days, 6 hours, 28 minutes, and 16 seconds of playing the game. For EXP and gil, the maximum amount is 4,294,967,295 (2^32 - 1), and once over the limit, it will overflow. EXP cannot be overflowed normally unless set to the maximum amount outside of battle. Cover percentage does not have a cap and can be increased by equipping multiple Cover Materia at once. The Cover chance overflows at 256%, reducing the percentage back to zero. Gil count maxes out at the 32bit limit, 4,294,967,295, after which it overflows to 0 gil.

    It is possible to underflow a character's HP stat by equipping enough Magic and Summon Materia to that character, both of which have HP-reducing stat penalties. Because an additive modifier is used for the reductions, and the max HP value cannot be negative, it will eventually default to 10 HP (the minimum value) before rolling over to an extremely high number, resulting in 9999 HP.

    Final Fantasy VIII

    Although damage is capped at 9,999, or 60,000 for select attacks, the restoration value for Drain junctioned to ST-Atk-J is not capped, and will roll back to 0 if it surpasses 65,535. This can be seen by stacking damage multipliers against a Blobra.

    If a party with an average level of 7 (Squall and two of Quisits, Zell, or Selphie) defeats a level 100 Malboro, the party will receive 1 EXP instead of the proper amount.

    The game keeps score of the player's Triple Triad wins, losses, and draws within the savedata, but the score is not viewable anywhere in-game. The figures overflow after 65,535 back to 0.

    Final Fantasy IX

    JumpRope
    Jump rope counter overflowing JumpRope.avi

    If the player plays for 100 hours 256 times, the game's internal clock will reset. This can be used to obtain the Excalibur II without playing for less than 12 hours. The player would be required to play for 25,600 hours, 1,067 days, or 2.92 years. The in-game clock color changes whenever it "rolls over" 100 hours from white to red to yellow to cyan to purple, and finally green. At 600 hours (after the timer has been green for 100 hours), the timer changes into a glitchy font and continues counting for 1 hour. At 601 hours the timer reverts to a green 99:59:59 and stops counting and nothing happens until the 2.92 years pass by when it overflows, returns to white 00:00:00 and starts all over.

    The time is counted by frames, not by actual seconds, so speeding up the framerate in an emulator will make the timer go faster. This is because of the PlayStation's hardware; since all PlayStations are designed to run at a specific frame rate, games can use that information to control their timing directly.

    If one has a Tetra Master card that is at max stats (FAFF) and it is used to play, eventually the card will overflow, reverting the card's power to, say, 0AFF.

    The maximum number of jumps in the jump rope minigame is 8,388,607 after which the next jump will overflow the counter to 0, and afterward the counter will not increase further.

    Final Fantasy Mystic Quest

    FFMQ Overflow Glitch
    After Benjamin cast Cure on Dark King.

    The Cure spell heals its target for a percentage of its maximum HP equal to 50 plus 1.5 times the caster's magic stat. Because of this, if Benjamin casts Cure on the Dark King, it will overflow and cause damage instead. This does not work for Phoebe; because her magic stat is nearly twice that of Benjamin's, her Cure overflows twice and recovers HP as normal.

    Final Fantasy Legend III

    FFLIII Overflow Glitch
    Dahak's sprite after his defeat.

    If Dahak uses Swallow on the entire party, he will heal more then he needs. It has to be group-cast due to the way Swallow is calculated compare to the single target Swallow which the calculation caps the amount of HP gained from it. The bug is on the formula on the group-cast, it will overflow his HP and make it a negative number that instantly defeats Dahak. Unlike normal defeated enemies, Dahak's sprite remains on the screen during the Battle Results.

    Technical explanation

    In computers, "overflow" occurs when a calculation produces a result larger (or smaller) than the values that can be represented by a given register or memory location.

    Most computers and gaming consoles are built on N-bit hardware architectures, meaning registers can hold integers within certain ranges:

    • Unsigned integers: [ 0 , 2 N 1 ] {\displaystyle [0,2^{N}-1]}
    • Signed integers (2's complement): [ 2 N 1 , 2 N 1 1 ] {\displaystyle [-2^{N-1},2^{N-1}-1]}

    Common architectures

    • 16-bit: unsigned range [0, 65,535]; signed range [-32,768, 32,767].
    Example: Super Nintendo Entertainment System
    • 32-bit: unsigned range [0, 4,294,967,295]; signed range [-2,147,483,648, 2,147,483,647].
    Example: PlayStation
    • 64-bit: unsigned range [0, 18,446,744,073,709,551,615]; signed range [-9,223,372,036,854,775,808, 9,223,372,036,854,775,807].
    Example: PlayStation 2

    When a calculation goes above the maximum value, an overflow occurs. When it goes below the minimum value, an underflow occurs (though "underflow" is sometimes incorrectly called "overflow").

    Because video games run on an Operating System (OS) that interfaces with the hardware, the relevant range for overflows is determined by the OS, not necessarily the console's full hardware capacity. For example, a 32-bit OS can run on a 64-bit machine, limiting values to 32-bit ranges.

    Additionally, ports of older games often preserve the original hardware limits for compatibility. This is one reason why overflow glitches may still appear on more advanced systems.

    Example with unsigned integers

    The number 65,535 is significant because it is the highest value an unsigned 16-bit binary number can represent.

    • Binary: 1111111111111111 (16 ones)
    • Hexadecimal: 0xFFFF

    The next integer, 65,536, would require 17 bits:

    • Binary: 10000000000000000
    • Hexadecimal: 0x010000

    On a 16-bit system, the most significant (17th) bit is discarded, leaving only 16 zeros. As a result:

    • 65,536 → stored as 0
    • 65,537 → stored as 1
    • and so on

    This behavior is an example of modular arithmetic, where all values are reduced modulo 2 N {\displaystyle 2^N} .

    Practical example: Damage overflow glitch in Final Fantasy V

    Example with signed integers

    The number 2,147,483,647 is the maximum for a signed 32-bit integer.

    • Binary (2's complement): 01111111111111111111111111111111

    In theory, the next integer (2,147,483,648) would be:

    • Binary: 10000000000000000000000000000000

    However, in 2's complement the leading bit has a negative weight to support the encoding of negative values. Therefore, the above binary sequence does not represent 2,147,483,648, but rather -2,147,483,648.

    From there:

    • 10000000000000000000000000000001 → -2,147,483,647
    • and so on

    Practical example: Damage overflow glitch in Final Fantasy VII

    Advertisement
    Community content is available under CC-BY-SA unless otherwise noted.