Results 1 to 10 of 14

Thread: Compiling mysql on CENTOS

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,731
    Thanks
    17
    Thanked 1,082 Times in 683 Posts
    Better fix which follows http://stackoverflow.com/questions/1...h-file-scope-c

    PHP Code:
    #define MAX_WEAPON_IGNORE_SIZE 20
    #define MAX_WEAPON_NAME_SIZE 32
    chardefaultweapon_mp;
    char ignoredWeapons[MAX_WEAPON_IGNORE_SIZE][MAX_WEAPON_NAME_SIZE];
    int ignoredWeaponCount 0;

    void gsc_utils_init() {
            if(
    defaultweapon_mp == NULL)
                    
    defaultweapon_mp = (char*)malloc(sizeof(char) * MAX_WEAPON_NAME_SIZE);
            if(
    defaultweapon_mp == NULL)
                    
    printf("Failed to malloc defaultweapon_mp\n");
            
    strcpy(defaultweapon_mp, (char*)"defaultweapon_mp");
            
    defaultweapon_mp[strlen(defaultweapon_mp)] = '\0';
    }

    void gsc_utils_free() {
            
    free(defaultweapon_mp);

    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. The Following 3 Users Say Thank You to IzNoGoD For This Useful Post:

    Ni3ls (21st March 2016),Paho (28th March 2016),voron00 (21st March 2016)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •