Article View: net.sources.bugs
Article #917Larn bug + fix
From: mac
Date: Thu, 29 Jan 1987 20:25
Date: Thu, 29 Jan 1987 20:25
50 lines
2163 bytes
2163 bytes
In larn 12, you could drop a huge number of gold pieces, and the
sanity check would let you through, allowing you to drop much more gold
tahn you had, and thereby decrement your current gold, and hence get a
huge amount.
Repeat By:
Play larn, and drop gold. When it asks how much, type any number
with 12 digits or more. It will tell you that you have dropped a
huge negative amount, and you current holdings will be so huge 12 digit
number. The actual gold dropped will be ~1024. AT this point it is
quite trivial to purchase whatever you might like, and kill off all the
monsters. (watch going down the Volcano with 192,000,000,000 gold
pieces. Gold is rather heavy, and that much weighs millions!).
Fix by:
applying this patch:
*** main.c Thu Jan 29 12:15:24 1987
--- main.c~ Sun Aug 10 20:45:46 1986
***************
*** 880,891
while (i != '\n')
{
if (i=='\033') { scbr(); lprcat(" aborted"); return(0); }
! /* Fixed bug allowing you to drop 999999999 and
! wrap the long around, getting a huge fortune,
! but causing the program to think we dropped 0.
! esl!cydrome!mac */
! if ((i <= '9') && (i >= '0') && (amt<99999999))
! amt = amt*10+i-'0';
i = getchar();
}
scbr(); return(amt);
--- 880,887 -----
while (i != '\n')
{
if (i=='\033') { scbr(); lprcat(" aborted"); return(0); }
! if ((i <= '9') && (i >= '0') && (amt<999999999))
! amt = amt*10+i-'0';
i = getchar();
}
scbr(); return(amt);
--
Michael Mc Namara
ESL Incorporated
ARPA: mac%esl@lll-lcc.ARPA
Technical Details
Message-ID:
<394@esl.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-spam!sri-unix!hplabs!cae780!leadsv!esl!macShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-spam!sri-unix!hplabs!cae780!leadsv!esl!mac From: mac@esl.UUCP Newsgroups: net.sources.bugs Subject: Larn bug + fix Message-ID: <394@esl.UUCP> Date: Thu, 29-Jan-87 15:25:54 EST Article-I.D.: esl.394 Posted: Thu Jan 29 15:25:54 1987 Date-Received: Sat, 31-Jan-87 05:12:22 EST Reply-To: mac@esl.UUCP (Mike McNamara) Distribution: world Organization: ESL, Inc., Sunnyvale, CA. Lines: 50