Skip to content

Commit

Permalink
Improve Webots and libcontroller version comparison (#6315)
Browse files Browse the repository at this point in the history
* only compare major version

* Update changelog-r2023.md
  • Loading branch information
ygoumaz committed Jul 10, 2023
1 parent a19d358 commit 3cf515d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/reference/changelog-r2023.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Released on XXX XXth, 2023.
- Improved overlays visible in Overlays menu by adding all the robots in the menu list ([#6297](https://github.com/cyberbotics/webots/pull/6297)).
- Bug fixes
- Fixed errors loading template PROTO if the system user name, the project path, or the temporary directory path contains the `\` character ([#6288](https://github.com/cyberbotics/webots/pull/6288)).
- Fixed Webots and libController version comparison not to take revisions into account ([#6315](https://github.com/cyberbotics/webots/pull/6315)).

## Webots R2023b
Released on June 28th, 2023.
Expand Down
3 changes: 1 addition & 2 deletions src/controller/c/robot.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,7 @@ static void robot_configure(WbRequest *r) {
robot.device[0]->name = request_read_string(r);

WEBOTS_VERSION = request_read_string(r);
if (strlen(WEBOTS_VERSION) && (strlen(WEBOTS_VERSION) != strlen(LIBCONTROLLER_VERSION) ||
strncmp(WEBOTS_VERSION, LIBCONTROLLER_VERSION, strlen(WEBOTS_VERSION))))
if (strlen(WEBOTS_VERSION) && (strncmp(WEBOTS_VERSION, LIBCONTROLLER_VERSION, 6)))
fprintf(stderr,
"Warning: Webots [%s] and libController [%s] versions are not the same for Robot '%s'! Different versions can lead "
"to undefined behavior.\n",
Expand Down

0 comments on commit 3cf515d

Please sign in to comment.