mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 19:19:05 +08:00
viewer: Fix format string
Variable port is an int, so "%d" is needed. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
d11b7e0624
commit
ef7838a950
@ -372,7 +372,7 @@ static int GetAddrInfo(const char* hostname, int port,
|
|||||||
struct addrinfo** address) {
|
struct addrinfo** address) {
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
char port_str[40];
|
char port_str[40];
|
||||||
snprintf(port_str, 40, "%ld", port);
|
snprintf(port_str, 40, "%d", port);
|
||||||
return getaddrinfo(hostname, port_str, NULL, address);
|
return getaddrinfo(hostname, port_str, NULL, address);
|
||||||
#else
|
#else
|
||||||
return GetAddrInfoNonLinux(hostname, port, address);
|
return GetAddrInfoNonLinux(hostname, port, address);
|
||||||
|
Loading…
Reference in New Issue
Block a user