summaryrefslogtreecommitdiff
path: root/noncore/games/kcheckers/echeckers.cpp
authorerik <erik>2007-01-24 23:29:42 (UTC)
committer erik <erik>2007-01-24 23:29:42 (UTC)
commit0076a11b467dce1233194ce228287a2a127b1f5d (patch) (unidiff)
treef2136a1a3e9b5fd6bede52251ed7249365838752 /noncore/games/kcheckers/echeckers.cpp
parent48d9219a96096cf44df8ac24413b36d1b718b1d5 (diff)
downloadopie-0076a11b467dce1233194ce228287a2a127b1f5d.zip
opie-0076a11b467dce1233194ce228287a2a127b1f5d.tar.gz
opie-0076a11b467dce1233194ce228287a2a127b1f5d.tar.bz2
Each file in this commit has the issue where it is possible for code to
overrun static buffers. This could lead to serious problems. Granted it is almost impossible to do that. But it isn't totally impossible. So this commit makes it impossible to overrun.
Diffstat (limited to 'noncore/games/kcheckers/echeckers.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kcheckers/echeckers.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/games/kcheckers/echeckers.cpp b/noncore/games/kcheckers/echeckers.cpp
index 1146059..afe62eb 100644
--- a/noncore/games/kcheckers/echeckers.cpp
+++ b/noncore/games/kcheckers/echeckers.cpp
@@ -81,5 +81,5 @@ bool ECheckers::checkCapture1()
81 if(board[i+5]==MAN2 || board[i+5]==KING2) 81 if(board[i+5]==MAN2 || board[i+5]==KING2)
82 if(board[i+10]==FREE) return true; 82 if(board[((i+10) < 54) ? i+10 : 53]==FREE) return true;
83 if(board[i+6]==MAN2 || board[i+6]==KING2) 83 if(board[i+6]==MAN2 || board[i+6]==KING2)
84 if(board[i+12]==FREE) return true; 84 if(board[((i+12) < 54) ? i+12 : 53]==FREE) return true;
85 } 85 }
@@ -223,5 +223,5 @@ bool ECheckers::checkCapture2()
223 if(board[i+5]==MAN1 || board[i+5]==KING1) 223 if(board[i+5]==MAN1 || board[i+5]==KING1)
224 if(board[i+10]==FREE) return true; 224 if(board[((i+10) < 54) ? i+10 : 53]==FREE) return true;
225 if(board[i+6]==MAN1 || board[i+6]==KING1) 225 if(board[i+6]==MAN1 || board[i+6]==KING1)
226 if(board[i+12]==FREE) return true; 226 if(board[((i+12) < 54) ? i+12 : 53]==FREE) return true;
227 break; 227 break;
@@ -233,5 +233,5 @@ bool ECheckers::checkCapture2()
233 if(board[i+5]==MAN1 || board[i+5]==KING1) 233 if(board[i+5]==MAN1 || board[i+5]==KING1)
234 if(board[i+10]==FREE) return true; 234 if(board[((i+10) < 54) ? i+10 : 53]==FREE) return true;
235 if(board[i+6]==MAN1 || board[i+6]==KING1) 235 if(board[i+6]==MAN1 || board[i+6]==KING1)
236 if(board[i+12]==FREE) return true; 236 if(board[((i+12) < 54) ? i+12 : 53]==FREE) return true;
237 } 237 }