(wrong string) ée

From: <git_AT_suckless.org>
Date: Thu, 4 May 2017 19:30:06 +0200 (CEST)

commit 3b54793742de5a53141dd8711dd8cfb707d07471
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Thu May 4 19:26:28 2017 +0200
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Thu May 4 19:26:28 2017 +0200

    Fix bad function cast
    
    Signed-off-by: Mattias Andrée <maandree_AT_kth.se>

diff --git a/src/blind-translate.c b/src/blind-translate.c
index 0ee4b93..d8f44e2 100644
--- a/src/blind-translate.c
+++ b/src/blind-translate.c
_AT_@ -71,7 +71,7 @@ process(struct stream *stream, struct stream *trstream)
 {
         char *buf;
         size_t n, p = 0;
- double *trans;
+ double *trans, tmp;
         ssize_t trx = 0, try = 0;
         size_t above = 0, below = 0, left = 0, right = 0;
 
_AT_@ -83,8 +83,8 @@ process(struct stream *stream, struct stream *trstream)
 
         do {
                 if ((trans = next_pixel(trstream, &p))) {
- trx = (ssize_t)round(invtrans ? -trans[0] : trans[0]);
- try = (ssize_t)round(invtrans ? -trans[1] : trans[1]);
+ trx = (ssize_t)(tmp = round(invtrans ? -trans[0] : trans[0]));
+ try = (ssize_t)(tmp = round(invtrans ? -trans[1] : trans[1]));
 
                         above = try > 0 ? (size_t)try : 0;
                         below = try < 0 ? (size_t)-try : 0;
_AT_@ -106,7 +106,7 @@ process_wrap(struct stream *stream, struct stream *trstream)
 {
         char *buf, *row;
         size_t n, rown, p = 0;
- double *trans;
+ double *trans, tmp;
         ssize_t trx = 0, try = 0, py;
         size_t off = 0, y;
 
_AT_@ -116,8 +116,8 @@ process_wrap(struct stream *stream, struct stream *trstream)
 
         while (eread_frame(stream, buf, n)) {
                 if ((trans = next_pixel(trstream, &p))) {
- trx = (ssize_t)round(invtrans ? -trans[0] : trans[0]);
- try = (ssize_t)round(invtrans ? -trans[1] : trans[1]);
+ trx = (ssize_t)(tmp = round(invtrans ? -trans[0] : trans[0]));
+ try = (ssize_t)(tmp = round(invtrans ? -trans[1] : trans[1]));
                         trx %= (ssize_t)stream->width;
                         if (trx < 0)
                                 trx += (ssize_t)stream->width;
Received on Thu May 04 2017 - 19:30:06 CEST

This archive was generated by hypermail 2.3.0 : Thu May 04 2017 - 19:36:29 CEST