Skip to content

Commit

Permalink
Merge pull request #53 from marek22k/docs
Browse files Browse the repository at this point in the history
Fix version decoding
  • Loading branch information
chipot authored Mar 5, 2024
2 parents 18ee864 + 551f378 commit 77de101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ This function returns the version number of libtuntap.
You can extract the major and the minor like this:

int version = tuntap_version();
int major = version >> 8;
int minor = version & major;
int major = (version >> 8) & 0xFF;
int minor = version & 0xFF;

Note that this version number is not the same as the shared library version.

Expand Down

0 comments on commit 77de101

Please sign in to comment.