#557 /bug report tool not working for DoF client

Closed
opened 2 months ago by ColdLlama · 0 comments

World.cpp (Line 1022) checks the size of list (vector). If the the .size is less than 7, it reports Invalid bug list and returns.

The problem is that while AoM client reports 7 elements, the DoF client report 6. Thus, if a user is in DoF client, they are unable to use the /bug dialog to create a report. DoF's missing element is the client version.

Arg Name
[0] Category
[1] SubCategory
[2] Causes Crash
[3] Reproducible
[4] Summary
[5] Description
[6] Client Version

The list (vector) is created from breaking apart data (string) and then using .pushback() to add the elements to the vector.

The data string is created in Commands.cpp, by iterating through sep (Seperator) arguments, which creates a string containing all the elements sent by the client, and adding a special character (int 7, \a, BELL) as the delimiter between the elements.

The client version is available via client->GetVersion()

Adding the following code to Commands.cpp at line 11324 will resolve the issue

    if(!sep->IsSet(7)){
        data.append(" ").append(std::to_string(client->GetVersion())).append("\a");
    }

The code checks to see if sep->arg[6] is set, and if not, appends client->GetVersion() to the existing data string with proper formatting and delimiter character.

**World.cpp** *(Line 1022)* checks the size of `list` *(vector<string>)*. If the the .size is less than 7, it reports `Invalid bug list` and returns. The problem is that while AoM client reports 7 elements, the DoF client report 6. Thus, if a user is in DoF client, they are unable to use the /bug dialog to create a report. DoF's missing element is the client version. | Arg | Name | | ----|----------------| | [0] | Category | | [1] | SubCategory | | [2] | Causes Crash | | [3] | Reproducible | | [4] | Summary | | [5] | Description | | [6] | Client Version | The `list` *(vector)* is created from breaking apart `data` *(string)* and then using `.pushback()` to add the elements to the vector. The `data` string is created in **Commands.cpp**, by iterating through `sep` *(Seperator)* arguments, which creates a string containing all the elements sent by the client, and adding a special character *(int 7, \a, BELL)* as the delimiter between the elements. The client version is available via `client->GetVersion()` Adding the following code to **Commands.cpp** at line 11324 will resolve the issue if(!sep->IsSet(7)){ data.append(" ").append(std::to_string(client->GetVersion())).append("\a"); } The code checks to see if sep->arg[6] is set, and if not, appends `client->GetVersion()` to the existing `data` string with proper formatting and delimiter character.
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.