Revision 4b74fe1f dyngen.c

b/dyngen.c
198 198
        {
199 199
            uint8_t *p;
200 200
            p = p_end - 1;
201
            /* find ret */
202
            while (p > p_start && *p != 0xc3)
203
                p--;
204
            /* skip double ret */
205
            if (p > p_start && p[-1] == 0xc3)
206
                p--;
207 201
            if (p == p_start)
208 202
                error("empty code for %s", name);
203
            if (p[0] != 0xc3)
204
                error("ret expected at the end of %s", name);
209 205
            copy_size = p - p_start;
210 206
        }
211 207
        break;

Also available in: Unified diff