A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[lgtm] Ensure that the type casting is done before multiplication to prevent overflow.
[simgrid.git]
/
src
/
kernel
/
routing
/
NetPoint.cpp
diff --git
a/src/kernel/routing/NetPoint.cpp
b/src/kernel/routing/NetPoint.cpp
index
fad35e5
..
5112bc6
100644
(file)
--- a/
src/kernel/routing/NetPoint.cpp
+++ b/
src/kernel/routing/NetPoint.cpp
@@
-36,7
+36,8
@@
NetPoint* NetPoint::set_englobing_zone(NetZoneImpl* netzone_p)
NetPoint* NetPoint::set_coordinates(const std::string& coords)
{
- new vivaldi::Coords(this, coords);
+ if (not coords.empty())
+ new vivaldi::Coords(this, coords);
return this;
}
} // namespace routing