~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/tunnelbridge_cmd.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Kooijman, cdcb73a
  • Date: 2009-12-24 00:55:45 UTC
  • mfrom: (1.1.9 upstream) (2.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091224005545-ffwi801t8mvqtgwz
[cdcb73a] Imported Upstream version 0.7.5. This release fixes
CVE-2009-4007.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: tunnelbridge_cmd.cpp 17346 2009-09-01 13:16:53Z rubidium $ */
 
1
/* $Id: tunnelbridge_cmd.cpp 18477 2009-12-13 00:24:53Z rubidium $ */
2
2
 
3
3
/** @file tunnelbridge_cmd.cpp
4
4
 * This file deals with tunnels and bridges (non-gui stuff)
248
248
        if (transport_type != TRANSPORT_WATER) {
249
249
                /* set and test bridge length, availability */
250
250
                if (!CheckBridge_Stuff(bridge_type, bridge_len, flags)) return_cmd_error(STR_5015_CAN_T_BUILD_BRIDGE_HERE);
 
251
        } else {
 
252
                if (bridge_len > (_settings_game.construction.longbridges ? 100U : 16U)) return_cmd_error(STR_5015_CAN_T_BUILD_BRIDGE_HERE);
251
253
        }
252
254
 
253
255
        /* retrieve landscape height and ensure it's on land */