aboutsummaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2008-09-13 18:29:20 +0000
committerSimon Tatham <anakin@pobox.com>2008-09-13 18:29:20 +0000
commit1d661ec46b8d7216bc6f2e34a4d6b9cc9fdc6f96 (patch)
tree7d148a3d1d265a36957636faa3b5e7aba92bd1f9 /net.c
parent5ead207060a3e1f74ad6200fdf02934457394bc2 (diff)
downloadpuzzles-1d661ec46b8d7216bc6f2e34a4d6b9cc9fdc6f96.zip
puzzles-1d661ec46b8d7216bc6f2e34a4d6b9cc9fdc6f96.tar.gz
puzzles-1d661ec46b8d7216bc6f2e34a4d6b9cc9fdc6f96.tar.bz2
puzzles-1d661ec46b8d7216bc6f2e34a4d6b9cc9fdc6f96.tar.xz
Patch from James H providing lots more paranoid casting. Also one
actual behaviour change: Untangle now permits dragging with the right mouse button, which has exactly the same effect as it does with the left. (Harmless on desktop platforms, but helpful when "right-click" is achieved by press-and-hold; now the drag takes place even if you hesitate first.) [originally from svn r8177]
Diffstat (limited to 'net.c')
-rw-r--r--net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net.c b/net.c
index ab16b1a..1177f80 100644
--- a/net.c
+++ b/net.c
@@ -232,7 +232,7 @@ static void decode_params(game_params *ret, char const *string)
ret->wrapping = TRUE;
} else if (*p == 'b') {
p++;
- ret->barrier_probability = atof(p);
+ ret->barrier_probability = (float)atof(p);
while (*p && (*p == '.' || isdigit((unsigned char)*p))) p++;
} else if (*p == 'a') {
p++;
@@ -2863,8 +2863,8 @@ static void game_print_size(game_params *params, float *x, float *y)
* I'll use 8mm squares by default.
*/
game_compute_size(params, 800, &pw, &ph);
- *x = pw / 100.0;
- *y = ph / 100.0;
+ *x = pw / 100.0F;
+ *y = ph / 100.0F;
}
static void draw_diagram(drawing *dr, game_drawstate *ds, int x, int y,