<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://manicpop.org/gewiki/index.php?action=history&amp;feed=atom&amp;title=Classic_bug%3A_Planet_conquest_bypasses_ownership_limit</id>
	<title>Classic bug: Planet conquest bypasses ownership limit - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://manicpop.org/gewiki/index.php?action=history&amp;feed=atom&amp;title=Classic_bug%3A_Planet_conquest_bypasses_ownership_limit"/>
	<link rel="alternate" type="text/html" href="https://manicpop.org/gewiki/index.php?title=Classic_bug:_Planet_conquest_bypasses_ownership_limit&amp;action=history"/>
	<updated>2026-10-20T14:44:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://manicpop.org/gewiki/index.php?title=Classic_bug:_Planet_conquest_bypasses_ownership_limit&amp;diff=1574&amp;oldid=prev</id>
		<title>CodexBot: Link first command references to command pages</title>
		<link rel="alternate" type="text/html" href="https://manicpop.org/gewiki/index.php?title=Classic_bug:_Planet_conquest_bypasses_ownership_limit&amp;diff=1574&amp;oldid=prev"/>
		<updated>2026-10-12T02:15:35Z</updated>

		<summary type="html">&lt;p&gt;Link first command references to command pages&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Classic bug&lt;br /&gt;
|id=GE-BUG-050&lt;br /&gt;
|affected=Classic 3.2e and ge-next through 0.2.6&lt;br /&gt;
|status=Verified in source; corrected in ge-next&lt;br /&gt;
|fixed=ge-next 0.3&lt;br /&gt;
|source=&amp;lt;code&amp;gt;attack_men()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;attack_fig()&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;wonplnt()&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;GECMDS.C&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Classic GE enforces the configured maximum number of owned planets when a player claims an unowned planet with [[Admin command|&amp;lt;code&amp;gt;ADMIN&amp;lt;/code&amp;gt;]], but not when a player conquers an owned planet with [[Attack command|&amp;lt;code&amp;gt;ATTACK&amp;lt;/code&amp;gt;]]. A player already at the &amp;lt;code&amp;gt;MAXPLNTS&amp;lt;/code&amp;gt; limit can therefore continue capturing planets and raise the owned-planet total beyond the configured maximum.&lt;br /&gt;
&lt;br /&gt;
The distributed classic configuration describes &amp;lt;code&amp;gt;MAXPLNTS&amp;lt;/code&amp;gt; as the maximum number of planets a single player can own and defaults it to 20. The attack path makes that setting a limit on peaceful claims rather than an actual ownership limit.&lt;br /&gt;
&lt;br /&gt;
== Cause ==&lt;br /&gt;
The &amp;lt;code&amp;gt;ADMIN&amp;lt;/code&amp;gt; path explicitly checks the user&amp;#039;s cached planet count before beginning an unowned-planet claim:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
if (waruptr-&amp;gt;planets &amp;gt;= max_plnts)&lt;br /&gt;
    return;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Planetary combat uses separate troop and fighter routines. Whenever either routine decides that the conquest conditions have been met, classic sets a local flag without consulting &amp;lt;code&amp;gt;max_plnts&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
won = 1;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The successful attack later calls &amp;lt;code&amp;gt;wonplnt()&amp;lt;/code&amp;gt;. That helper transfers the planet to the attacker and increments the attacker&amp;#039;s count unconditionally:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
strncpy(plptr-&amp;gt;userid, warsptr-&amp;gt;userid, UIDSIZ);&lt;br /&gt;
warsptr-&amp;gt;hostile = 0;&lt;br /&gt;
++waruptr-&amp;gt;planets;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because neither the combat routines nor &amp;lt;code&amp;gt;wonplnt()&amp;lt;/code&amp;gt; enforce the limit, every further successful conquest can add another planet.&lt;br /&gt;
&lt;br /&gt;
== Reproduction ==&lt;br /&gt;
# Configure a low &amp;lt;code&amp;gt;MAXPLNTS&amp;lt;/code&amp;gt; value or acquire enough colonies to reach the existing limit.&lt;br /&gt;
# Attempt to claim another unowned planet with &amp;lt;code&amp;gt;ADMIN&amp;lt;/code&amp;gt;. The game correctly refuses the claim.&lt;br /&gt;
# Orbit a planet belonging to another player and conquer it with &amp;lt;code&amp;gt;ATTACK&amp;lt;/code&amp;gt; using troops or fighters.&lt;br /&gt;
# Run [[Planet command|&amp;lt;code&amp;gt;PLANET&amp;lt;/code&amp;gt;]] or inspect the player record. The captured planet is owned by the attacker and the owned-planet count is now above &amp;lt;code&amp;gt;MAXPLNTS&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Repeat the conquest process to continue increasing the total.&lt;br /&gt;
&lt;br /&gt;
The exploit requires the player to win normal planetary combat; it does not make conquest itself free. It does, however, completely bypass the ownership cap once suitable target planets can be defeated.&lt;br /&gt;
&lt;br /&gt;
== Gameplay consequences ==&lt;br /&gt;
* An aggressive player can control more colonies than the sysop intended, gaining additional production, tax income, storage, defenses, and trade locations.&lt;br /&gt;
* The configured limit affects peaceful expansion but not military expansion, creating an undocumented strategic advantage for conquest.&lt;br /&gt;
* Other systems may encounter ownership totals and planet lists larger than their configuration was intended to permit. In ge-next, whose later default allowed 200 planets per player, large unpaged &amp;lt;code&amp;gt;PLANET&amp;lt;/code&amp;gt; output could become long enough to disconnect the requesting user.&lt;br /&gt;
* Reaching or exceeding the limit prevents further &amp;lt;code&amp;gt;ADMIN&amp;lt;/code&amp;gt; claims, but does not stop another attack from adding yet another planet.&lt;br /&gt;
&lt;br /&gt;
== Correction in ge-next 0.3 ==&lt;br /&gt;
ge-next 0.3 applies the ownership test to every troop- and fighter-conquest condition. A conquest is permitted only while:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
waruptr-&amp;gt;planets &amp;lt; max_plnts&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the player is already at the limit, combat casualties and other attack effects are still resolved, but the conquest flag is not set, ownership is not transferred, and the game reports the maximum-planet restriction. The checks cover surrender, complete elimination of defenders, attacks on undefended planets, and successful fighter conquest.&lt;br /&gt;
&lt;br /&gt;
The same release added 20-record pagination to the &amp;lt;code&amp;gt;PLANET&amp;lt;/code&amp;gt; command, preventing unusually large legitimate or legacy over-limit empires from producing one unbounded terminal listing. The ownership fix prevents new over-limit captures; pagination safely handles the records that already exist.&lt;br /&gt;
&lt;br /&gt;
The corrected behavior is present in both 16-bit and 32-bit ge-next. &amp;lt;code&amp;gt;ATTACK&amp;lt;/code&amp;gt; and persistent planet ownership are disabled in ge-arena, so this defect does not apply there.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Attack command]]&lt;br /&gt;
* [[Planet command]]&lt;br /&gt;
* [[Admin command]]&lt;br /&gt;
* [[Planet administration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Classic bugs: Planets]]&lt;br /&gt;
[[Category:Classic bugs: Configuration]]&lt;br /&gt;
&lt;br /&gt;
{{GE navigation}}&lt;/div&gt;</summary>
		<author><name>CodexBot</name></author>
	</entry>
</feed>