Go Back   Angband Forums > Angband > Development

Thread Tools Display Modes
Old July 13, 2011, 19:42   #1
Join Date: May 2007
Posts: 289
CJNyfalt is on a distinguished road
Bug found in ui.c.

I found a bug in the region calculate function in ui.c.

region region_calculate(region loc)
        int w, h;
        Term_get_size(&w, &h);

        if (loc.col < 0)
                loc.col += w;
        if (loc.row < 0)
                loc.row += w;
        if (loc.width <= 0)
                loc.width += w - loc.col;
        if (loc.page_rows <= 0)
                loc.page_rows += h - loc.row;

        return loc;
As you can see the action following the second if statement is incorrect. It should be:
        if (loc.row < 0)
                loc.row += h;
That is add h(eight) not w(idth) to row.
CJNyfalt is offline   Reply With Quote
Old July 13, 2011, 20:15   #2
Angband Devteam member
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Fixed- thanks.
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug: You have found - gold pieces worth of adamantie Raggy Vanilla 6 July 6, 2011 03:23
Just found this place (sort of) diabloblanco Vanilla 0 February 3, 2011 07:27
Artifacts found at 600ft Malak Darkhunter Vanilla 43 February 28, 2010 19:35
Found a pseudo-id bug.. i think. timtek Vanilla 8 September 6, 2009 21:47
[FA] Found a dungeon chris28 Variants 6 June 4, 2008 22:00

All times are GMT +1. The time now is 03:24.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.