Commit b23310a7 authored by Jordan Sissel's avatar Jordan Sissel

- port is unsigned. (fixes crash if you attempted to use a port >32768)

parent 4ca3b78b
......@@ -9,7 +9,7 @@ struct emitter_config {
size_t window_size; /* the window size */
char *host;
short port;
unsigned short port;
};
void *emitter(void *arg);
......
......@@ -173,7 +173,7 @@ int main(int argc, char **argv) {
emitter_config.host = strdup(optarg);
break;
case opt_port:
emitter_config.port = (short)atoi(optarg);
emitter_config.port = (unsigned short)atoi(optarg);
break;
case opt_window_size:
emitter_config.window_size = (size_t)atoi(optarg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment