Skip to content

Commit

Permalink
Update gateway.cpp
Browse files Browse the repository at this point in the history
possible out of range fix
  • Loading branch information
Infactum authored Dec 16, 2021
1 parent 99805b7 commit c45b309
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tg2sip/gateway.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ namespace state_machine::actions {
ctx.ext_phone = ext.substr(1, std::string::npos);
} else if (is_digits(ext)) {
try {
ctx.user_id = std::stoi(ext);
ctx.user_id = std::stol(ext);
} catch (const std::invalid_argument &e) {
ext_valid = false;
} catch (const std::out_of_range &e) {
Expand Down Expand Up @@ -906,4 +906,4 @@ void Gateway::process_event(const TSipEvent &event) {
delete *iter;
bridges.erase(iter);
}
}
}

0 comments on commit c45b309

Please sign in to comment.