]> git.sur5r.net Git - openocd/commitdiff
김운식 <donari75@gmail.com> spotted a bug in target_write_u8
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 15 Oct 2008 07:08:18 +0000 (07:08 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 15 Oct 2008 07:08:18 +0000 (07:08 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1063 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/target.c

index 6a5c890221cfe36ee58ebc31904379115115f866..5fde4f8f1d05b49f8b3ac61f66b8521d03e634b7 100644 (file)
@@ -1300,7 +1300,7 @@ int target_write_u8(struct target_s *target, u32 address, u8 value)
 
        LOG_DEBUG("address: 0x%8.8x, value: 0x%2.2x", address, value);
 
-       if ((retval = target->type->read_memory(target, address, 1, 1, &value)) != ERROR_OK)
+       if ((retval = target->type->write_memory(target, address, 1, 1, &value)) != ERROR_OK)
        {
                LOG_DEBUG("failed: %i", retval);
        }