forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-engines/odamex: Fix building with GCC-6
Bug: https://bugs.gentoo.org/show_bug.cgi?id=610566 Package-Manager: Portage-2.3.6, Repoman-2.3.2
- Loading branch information
1 parent
91ee8a4
commit 2a95b6d
Showing
2 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Bug: https://bugs.gentoo.org/610566 | ||
Commit: https://github.com/odamex/odamex/commit/1d8121c78fe2db9befb05dd40ceb9b86062024e4 | ||
|
||
From 1d8121c78fe2db9befb05dd40ceb9b86062024e4 Mon Sep 17 00:00:00 2001 | ||
From: rice <[email protected]> | ||
Date: Tue, 30 Aug 2016 08:37:15 +0000 | ||
Subject: [PATCH] - Apply patch from bug 1177, thanks RjY! | ||
|
||
SVN r5444 (trunk) | ||
--- | ||
common/m_vectors.cpp | 10 +++++----- | ||
1 file changed, 5 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/common/m_vectors.cpp b/common/m_vectors.cpp | ||
index b51e4e40..2eb48a04 100644 | ||
--- a/common/m_vectors.cpp | ||
+++ b/common/m_vectors.cpp | ||
@@ -541,16 +541,16 @@ void M_PerpendicularVec3(v3double_t *dest, const v3double_t *src) | ||
{ | ||
// find the smallest component of the vector src | ||
v3double_t tempvec; | ||
- double minelem = src->x; | ||
+ double minelem = fabs(src->x); | ||
double *mincomponent = &(tempvec.x); | ||
- if (abs(src->y) < minelem) | ||
+ if (fabs(src->y) < minelem) | ||
{ | ||
- minelem = abs(src->y); | ||
+ minelem = fabs(src->y); | ||
mincomponent = &(tempvec.y); | ||
} | ||
- if (abs(src->z) < minelem) | ||
+ if (fabs(src->z) < minelem) | ||
{ | ||
- minelem = abs(src->z); | ||
+ minelem = fabs(src->z); | ||
mincomponent = &(tempvec.z); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters