Jump to content
  • Sign in to follow this  

    SetInUse(bool state) crash


    Komaeda
    • Status: Awaiting Feedback
      Main Category: Core / Mangos Daemon
      Sub-Category: Core Freeze
      Version: 21.2 Milestone: 21 (Current) Priority: New
      Related to:
      Implemented Version: 0.20

    server cash

    void SetInUse(bool state)
    {
    if (state)
    { ++m_in_use; } // this crash
    else
    {
    if (m_in_use)
    { --m_in_use; }
    }
    }

    Sign in to follow this  


    User Feedback

    Recommended Comments

    It's an unsigned int so it cant go into negative values.

    Change to:

            void SetInUse(bool state)
            {
                if (state)
                    { ++m_in_use; }
                else
                {
                    if (m_in_use > 0)
                        { --m_in_use; }
                }
            }

     

    Share this comment


    Link to comment
    Share on other sites


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use