Fix
This commit is contained in:
parent
b033b8fb7c
commit
2052771fb3
|
@ -21,7 +21,9 @@ typedef struct gb_timers_t {
|
||||||
} GBTimers;
|
} GBTimers;
|
||||||
|
|
||||||
GBTimers *gb_timers_open(RIO *io);
|
GBTimers *gb_timers_open(RIO *io);
|
||||||
void gb_timers_open(RIO *io, GBTimers);
|
void gb_timers_close(RIO *io, GBTimers *timers);
|
||||||
void gb_timers_update(GBTimers *timers, ut32 cycles);
|
void gb_timers_update(GBTimers *timers, ut32 cycles);
|
||||||
|
|
||||||
|
extern RIOPlugin r_io_plugin_gb_timers;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -51,9 +51,9 @@ static bool __close(RIODesc *desc) {
|
||||||
static int __write(RIO *io, RIODesc *desc, const ut8 *buf, int len) {
|
static int __write(RIO *io, RIODesc *desc, const ut8 *buf, int len) {
|
||||||
GBTimers *timers = (GBTimers *)desc->data;
|
GBTimers *timers = (GBTimers *)desc->data;
|
||||||
if (timers->seek == 4) {
|
if (timers->seek == 4) {
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
int wlen = R_MIN (len, 4 - timers->seek)
|
int wlen = R_MIN (len, 4 - timers->seek);
|
||||||
ut64 endseek = timers->seek + wlen;
|
ut64 endseek = timers->seek + wlen;
|
||||||
ut32 i;
|
ut32 i;
|
||||||
for (i = 0; timers->seek < endseek; timers->seek++) {
|
for (i = 0; timers->seek < endseek; timers->seek++) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user