Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
23dc6d0a
Commit
23dc6d0a
authored
10 years ago
by
Dave Hylands
Browse files
Options
Downloads
Patches
Plain Diff
Fix truncation problem when using longlong implementation.
parent
c4029e50
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
py/objint.c
+11
-1
11 additions, 1 deletion
py/objint.c
with
11 additions
and
1 deletion
py/objint.c
+
11
−
1
View file @
23dc6d0a
...
...
@@ -115,7 +115,17 @@ char *mp_obj_int_formatted(char **buf, int *buf_size, int *fmt_size, mp_obj_t se
*
fmt_size
=
0
;
return
*
buf
;
}
fmt_int_t
num
=
mp_obj_get_int
(
self_in
);
fmt_int_t
num
;
#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_LONGLONG
mp_obj_int_t
*
self
=
self_in
;
if
(
MP_OBJ_IS_TYPE
(
self_in
,
&
mp_type_int
))
{
// mp_obj_get_int truncates to machine_int_t
num
=
self
->
val
;
}
else
#endif
{
num
=
mp_obj_get_int
(
self_in
);
}
char
sign
=
'\0'
;
if
(
num
<
0
)
{
num
=
-
num
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment