Browse Source

* use INT_MAX instead of 99999...

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@411 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam 20 years ago
parent
commit
6733c9623c
3 changed files with 9 additions and 6 deletions
  1. +3
    -2
      src/phpbb.c
  2. +3
    -2
      src/slashdot.c
  3. +3
    -2
      src/test.c

+ 3
- 2
src/phpbb.c View File

@@ -12,6 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>

#include "config.h"
#include "common.h"
@@ -62,10 +63,10 @@ char *decode_phpbb(struct image *img)
for(cur = 0; cur < 6; cur++)
{
/* Try to find 1st letter */
distmin = 999999999;
distmin = INT_MAX;
for(i = 0; i < 35; i++)
{
int localmin = 99999999, localx, localy;
int localmin = INT_MAX localx, localy;
xmin = i * 40;
ymin = 0;
xmax = i * 40 + 40;


+ 3
- 2
src/slashdot.c View File

@@ -12,6 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <math.h>

#include "config.h"
@@ -323,10 +324,10 @@ static struct image *find_glyphs(struct image *img)
while(cur < 7)
{
/* Try to find 1st letter */
distmin = 999999999;
distmin = INT_MAX;
for(i = 0; i < 22; i++)
{
int localmin = 99999999, localx, localy;
int localmin = INT_MAX, localx, localy;
//if(all[i] == 'i') continue;
xmin = glyphs[i].xmin;
ymin = glyphs[i].ymin;


+ 3
- 2
src/test.c View File

@@ -12,6 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <math.h>

#include "config.h"
@@ -89,10 +90,10 @@ static struct image *find_glyphs(struct image *img)
while(cur < 6)
{
/* Try to find 1st letter */
distmin = 999999999;
distmin = INT_MAX;
for(i = 0; i < 35; i++)
{
int localmin = 99999999, localx, localy;
int localmin = INT_MAX, localx, localy;
xmin = i * 40;
ymin = 0;
xmax = i * 40 + 40;


Loading…
Cancel
Save